Commit Graph

11775 Commits

Author SHA1 Message Date
Chris Lattner c707fa9651 move some select simplifications out out instcombine into
inst simplify.  No functionality change.

llvm-svn: 101873
2010-04-20 05:32:14 +00:00
Eric Christopher 64831c6a4c Remove the palignr intrinsics now that we lower them to vector shuffles,
shifts and null vectors. Autoupgrade these to what we'd lower them to.

Add a testcase to exercise this.

llvm-svn: 101851
2010-04-20 00:59:54 +00:00
Dan Gohman e450d7444d Sink DebugLoc handling out of SelectionDAGISel into FastISel and
SelectionDAGBuilder, where it doesn't have to be as complicated.

llvm-svn: 101848
2010-04-20 00:48:35 +00:00
Chris Lattner aedb8a3535 make CallGraphNode dtor abort if a node is deleted when there are still
references to it.

llvm-svn: 101847
2010-04-20 00:47:34 +00:00
Dan Gohman 3df671a81c Remove MachineFunction's DefaultDebugLoc member, and make DwarfDebug.cpp
responsible for figuring out what that's supposed to be on its own.

llvm-svn: 101844
2010-04-20 00:37:27 +00:00
Dan Gohman ca35aa1122 Reapply the removal of SelectionDAGISel's BB, with a fix for the case
where multiple blocks are emitted; functions which do this need to return
the new BB so that their callers can stay current.

llvm-svn: 101843
2010-04-20 00:29:35 +00:00
Dan Gohman be2e727a38 Revert 101825, which is causing trouble.
llvm-svn: 101832
2010-04-19 23:34:15 +00:00
Dan Gohman 8cccc542f6 Eliminate SelectionDAGISel's "current block" member. Just pass it as
an argument to things that need it.

llvm-svn: 101825
2010-04-19 22:51:14 +00:00
Dan Gohman e637ff5e9a Remove the Expr member from IVUsers. Instead of remembering the expression,
just ask ScalarEvolution for it on demand. This helps IVUsers be more robust
in the case of expressions changing underneath it. This fixes PR6862.

llvm-svn: 101819
2010-04-19 21:48:58 +00:00
Dan Gohman 1e95790fd4 Give SelectionDAG a TargetMachine too, rather than having it
fetch one from the MachineFunction.

llvm-svn: 101807
2010-04-19 19:22:07 +00:00
Devang Patel 6188093cca Add DW_AT_APPLE_omit_frame_ptr to encode -fomit-frame-pointer flag.
llvm-svn: 101805
2010-04-19 19:14:02 +00:00
Dan Gohman c334960f16 Code that needs a TargetMachine should have access to one directly, rather
than just getting one through a TargetLowering.

llvm-svn: 101802
2010-04-19 19:05:59 +00:00
Benjamin Kramer 3576b74bb9 Don't write into MemoryBuffers.
llvm-svn: 101783
2010-04-19 16:15:31 +00:00
Dan Gohman 3bb1bcbe6d Add a few more ELF bits.
llvm-svn: 101778
2010-04-19 15:40:15 +00:00
Dan Gohman b204fd4308 Add a const.
llvm-svn: 101777
2010-04-19 15:39:27 +00:00
Dan Gohman 26e7d81df8 These functions don't need to access this.
llvm-svn: 101776
2010-04-19 15:38:38 +00:00
Anton Korobeynikov 7d62e33291 Make processor FUs unique for given itinerary. This extends the limit of 32
FU per CPU arch to 32 per intinerary allowing precise modelling of quite
complex pipelines in the future.

llvm-svn: 101754
2010-04-18 20:31:01 +00:00
Bill Wendling c4adfa3467 Add a "PadTo" field to the emitULEB128Bytes method. This will pad out to the
indicated number of bytes.

llvm-svn: 101684
2010-04-18 00:51:49 +00:00
Dale Johannesen 0b685eb778 Add comment (lost when reverting and reapplying 101503).
llvm-svn: 101664
2010-04-17 19:56:46 +00:00
Chris Lattner b927073f2e teach the x86 asm parser how to handle segment prefixes
in memory operands.  rdar://7874844

llvm-svn: 101661
2010-04-17 18:56:34 +00:00
Chris Lattner 926885c090 refactor .if handling code a bit.
llvm-svn: 101659
2010-04-17 18:14:27 +00:00
Dan Gohman 53d4a08d2b Add const qualifiers to TargetLoweringObjectFile usage.
llvm-svn: 101640
2010-04-17 16:44:48 +00:00
Dan Gohman 21cea8ac2e Use const qualifiers with TargetLowering. This eliminates several
const_casts, and it reinforces the design of the Target classes being
immutable.

SelectionDAGISel::IsLegalToFold is now a static member function, because
PIC16 uses it in an unconventional way. There is more room for API
cleanup here.

And PIC16's AsmPrinter no longer uses TargetLowering.

llvm-svn: 101635
2010-04-17 15:26:15 +00:00
Chris Lattner 7c4f14bf90 reenable r101565, removing a problematic assertion.
CGSCC can delete nodes in regions of the callgraph that
have already been visited.  If new CG nodes are allocated
to the same pointer, we shouldn't abort, just handle it
correctly by assigning a new number.  This should restore
stability by removing invalidated pointers that *will* be
reused from the densemap in the iterator.

llvm-svn: 101628
2010-04-17 07:17:19 +00:00
Evan Cheng f1bd5fcdb4 More work to allow dag combiner to promote 16-bit ops to 32-bit.
llvm-svn: 101621
2010-04-17 06:13:15 +00:00
Bob Wilson ca51425d94 Re-commit my previous SSAUpdater changes. The previous version naively tried
to determine where to place PHIs by iteratively comparing reaching definitions
at each block.  That was just plain wrong.  This version now computes the
dominator tree within the subset of the CFG where PHIs may need to be placed,
and then places the PHIs in the iterated dominance frontier of each definition.
The rest of the patch is mostly the same, with a few more performance
improvements added in.

llvm-svn: 101612
2010-04-17 03:08:24 +00:00
Dale Johannesen 2543e303e1 Reapply 101503+101520. These are "obviously correct" [Chris]
and don't cause any problems on Darwin.

llvm-svn: 101584
2010-04-17 00:08:21 +00:00
Eric Christopher 7258dcd77f Revert 101465, it broke internal OpenGL testing.
Probably the best way to know that all getOperand() calls have been handled
is to replace that API instead of updating.

llvm-svn: 101579
2010-04-16 23:37:20 +00:00
Devang Patel 12563b3495 Add support to emit dwarf ranges.
llvm-svn: 101575
2010-04-16 23:33:45 +00:00
Dan Gohman 37df662b1c Add a getSelectionDAGInfo member to TargetMachine.
llvm-svn: 101567
2010-04-16 23:09:10 +00:00
Chris Lattner de023a3c1d building on the new CallGraphSCC abstraction, teach CallGraphSCCPassManager
to keep the node entries in scc_iterator up to date instead of dangling as
the SCC mutates.

This is a really terrible problem which was causing -g to affect codegen 
because it would permute the memory image of the compiler process.

Thanks to Dale for expertly hunting it down.

llvm-svn: 101565
2010-04-16 23:04:30 +00:00
Chris Lattner 5518b81a98 move ReplaceNode out of line, rename scc_iterator::fini -> isAtEnd().
No functionality change.

llvm-svn: 101562
2010-04-16 22:59:24 +00:00
Chris Lattner 4422d31b84 introduce a new CallGraphSCC class, and pass it around
to CallGraphSCCPass's instead of passing around a
std::vector<CallGraphNode*>.  No functionality change,
but now we have a much tidier interface.

llvm-svn: 101558
2010-04-16 22:42:17 +00:00
Chris Lattner d43a12df56 tidy up
llvm-svn: 101548
2010-04-16 21:57:10 +00:00
Dan Gohman c4759a5b97 Create a new TargetSelectionDAGInfo class. This will eventually acquire
SelectionDAG-specific parts of TargetLowering.

llvm-svn: 101537
2010-04-16 21:12:11 +00:00
Dan Gohman 148c69a3f6 Eliminate an unnecessary SelectionDAG dependency in getOptimalMemOpType.
llvm-svn: 101531
2010-04-16 20:11:05 +00:00
Dan Gohman 9dbe61456a Fix this code to avoid implicit assumptions about the length of the array.
llvm-svn: 101530
2010-04-16 20:08:45 +00:00
Dan Gohman 0591a050ff Revert 101520, which depended on 101503, which was reverted.
llvm-svn: 101528
2010-04-16 19:36:41 +00:00
Duncan Sands 7fc8123b37 Revert commit 101503 (johannes), in the hope of fixing the dragonegg build,
see http://google1.osuosl.org:8011/builders/dragonegg-x86_64-linux/builds/693
Original commit text:
Use a ValueMap not a std::map for the reason indicated
in the comment.  This was causing nondeterministic changes
in inlining decisions.

llvm-svn: 101525
2010-04-16 19:28:59 +00:00
Dan Gohman 076a3278a1 Trim a #include.
llvm-svn: 101520
2010-04-16 18:45:11 +00:00
Dale Johannesen 3104bf1618 Use a ValueMap not a std::map for the reason indicated
in the comment.  This was causing nondeterministic changes
in inlining decisions.

llvm-svn: 101503
2010-04-16 18:16:08 +00:00
Gabor Greif f375520f7b reapply r101434
with a fix for self-hosting

rotate CallInst operands, i.e. move callee to the back
of the operand array

the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary

llvm-svn: 101465
2010-04-16 15:33:14 +00:00
Dan Gohman b3862ecd48 Make callIsSmall accessible as a utility function.
llvm-svn: 101463
2010-04-16 15:14:50 +00:00
Bill Wendling 929f3c0927 The JIT calls TidyLandingPads to tidy up the landing pads. However, because the
JIT doesn't use the MC back-end asm printer to emit labels that it uses, the
section for the MCSymbol is never set. And thus the MCSymbol for the EH label
isn't marked as "defined". Because of that, TidyLandingPads removes the needed
landing pads from the JIT output. This breaks EH for every JIT program.

This is a work-around for this limitation. We pass in the label locations
map. If the label has a non-zero value, then it was "emitted" by the JIT and
TidyLandingPads shouldn't remove that label.

A nicer solution would be to mark the MCSymbol as "used" by the JIT and not rely
upon the section being set to determine if it's defined or not.

llvm-svn: 101453
2010-04-16 08:46:10 +00:00
Evan Cheng af56facacd Adding support for dag combiner to promote operations for profit. This requires target specific queries. For example, x86 should promote i16 to i32 when it does not impact load folding.
x86 support is off by default. It can be enabled with -promote-16bit.

Work in progress.

llvm-svn: 101448
2010-04-16 06:14:10 +00:00
Eric Christopher dea3bda860 Add a check for posix_spawn.
Regenerate configure and other autoconf files.

llvm-svn: 101444
2010-04-16 05:14:21 +00:00
Gabor Greif 403e9694f9 back out r101423 and r101397, they break llvm-gcc self-host on darwin10
llvm-svn: 101434
2010-04-16 01:16:20 +00:00
Gabor Greif 33ae80bff7 reapply r101364, which has been backed out in r101368
with a fix

rotate CallInst operands, i.e. move callee to the back
of the operand array

the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary

llvm-svn: 101397
2010-04-15 20:51:13 +00:00
Dan Gohman 4e3c1139a2 Make getPredecessorWithUniqueSuccessorForBB return the unique successor
in addition to the predecessor.

llvm-svn: 101374
2010-04-15 16:19:08 +00:00
Gabor Greif 9fd00c7d25 back out r101364, as it trips the linux nightlybot on some clang C++ tests
llvm-svn: 101368
2010-04-15 12:46:56 +00:00