Commit Graph

8049 Commits

Author SHA1 Message Date
Daniel Dunbar
afc1587800 Suppress -Asserts warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84327 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 09:33:00 +00:00
Evan Cheng
491f54f1fd Distinquish stack slots from other stack objects. They (and fixed objects) get FixedStack PseudoSourceValues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84326 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 09:20:14 +00:00
Evan Cheng
6553155172 Revert 84315 for now. Re-thinking the patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84321 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 07:53:04 +00:00
Evan Cheng
bf125583f8 Rename getFixedStack to getStackObject. The stack objects represented are not
necessarily fixed. Only those will negative frame indices are "fixed."


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84315 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 06:22:26 +00:00
Evan Cheng
cac25a9452 80 col violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84311 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 06:05:11 +00:00
Dan Gohman
f77fc92b03 Delete an obsolete comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84300 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 01:37:38 +00:00
Victor Hernandez
a276c603b8 Remove MallocInst from LLVM Instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84299 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 01:18:07 +00:00
Dan Gohman
3bdd8de280 Enhance CodePlacementOpt's unconditional intra-loop branch elimination logic
to be more general and understand more varieties of loops.

Teach CodePlacementOpt to reorganize the basic blocks of a loop so that
they are contiguous. This also includes a fair amount of logic for preserving
fall-through edges while doing so. This fixes a BranchFolding-ism where blocks
which can't be made to use a fall-through edge and don't conveniently fit
anywhere nearby get tossed out to the end of the function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84295 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 00:32:43 +00:00
Mon P Wang
3b7ee20d58 Allow widening of extract subvector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84279 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 22:05:48 +00:00
Devang Patel
808b82664f Do not emit name entry for a pointer type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84276 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 21:27:43 +00:00
Evan Cheng
fa16354e03 Change createPostRAScheduler so it can be turned off at llc -O1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84273 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 21:06:15 +00:00
Devang Patel
149aa7cce3 If there is not any llvm instruction associated with each lexical scope encoded in debug info then create such scope on demand for variable info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84262 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 18:18:03 +00:00
Evan Cheng
c83da2f9e3 If post-alloc scheduler is not enabled, it should return false, not true.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84248 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 06:10:34 +00:00
Zhongxing Xu
931424a7d8 Indent code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84247 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 05:42:28 +00:00
Evan Cheng
449c25baa0 80 column violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84244 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 05:18:39 +00:00
Jakob Stoklund Olesen
11ee508d7b Report errors correctly for unselected target intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84193 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-15 18:50:03 +00:00
Dan Gohman
cd2ae14ce3 Make CodePlacementOpt align loops, rather than loop headers. The
header is just the entry block to the loop, and it needn't be at
the top of the loop in the code layout.

Remove the code that suppressed loop alignment for outer loops,
so that outer loops are aligned.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84158 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-15 00:36:22 +00:00
Evan Cheng
a2f8047134 When LiveVariables is adding implicit-def to model "partial dead", add the earlyclobber marker if the superreg def has it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84153 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-14 23:39:27 +00:00
Evan Cheng
0789707c49 Print earlyclobber for implicit-defs as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84152 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-14 23:37:31 +00:00
Jim Grosbach
33524c3b26 Make loop not recalc getNumOperands() each time around
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84138 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-14 21:22:39 +00:00
Devang Patel
c90aefe95e Add support to record DbgScope as inlined scope.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84134 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-14 21:08:09 +00:00
Jim Grosbach
d0c3832754 quiet compiler warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84133 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-14 21:07:11 +00:00
Duncan Sands
b01bbdcc1a I don't see any point in having both eh.selector.i32 and eh.selector.i64,
so get rid of eh.selector.i64 and rename eh.selector.i32 to eh.selector.
Likewise for eh.typeid.for.  This aligns us with gcc, which always uses a
32 bit value for the selector on all platforms.  My understanding is that
the register allocator used to assert if the selector intrinsic size didn't
match the pointer size, and this was the reason for introducing the two
variants.  However my testing shows that this is no longer the case (I
fixed some bugs in selector lowering yesterday, and some more today in the
fastisel path; these might have caused the original problems).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84106 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-14 16:11:37 +00:00
Dan Gohman
9ba0e2ba87 This remat entry is basically done. There are hooks to allow targets
to remat non-load instructions as loads, and the remat code now uses
the UnmodeledSideEffects flags, MachineMemOperands, and similar things
to decide which instructions are valid for rematerialization.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84060 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-14 00:02:01 +00:00
Dan Gohman
363bbc0110 Add a few README.txt items.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84059 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 23:58:05 +00:00
Devang Patel
1619dc3b9e s/DebugLoc.CompileUnit/DebugLoc.Scope/g
s/DebugLoc.InlinedLoc/DebugLoc.InlinedAtLoc/g



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84054 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 23:28:53 +00:00
Duncan Sands
3a66a68b0c Introduce new convenience methods for sign extending or
truncating an SDValue (depending on whether the target
type is bigger or smaller than the value's type); or zero
extending or truncating it.  Use it in a few places (this
seems to be a popular operation, but I only modified cases
of it in SelectionDAGBuild).  In particular, the eh_selector
lowering was doing this wrong due to a repeated rather than
inverted test, fixed with this change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84027 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 21:04:12 +00:00
David Goodwin
d452ea6a64 Add debugging output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84011 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 19:16:03 +00:00
Daniel Dunbar
6e4bdfc229 Fix a -Asserts warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83950 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 06:47:08 +00:00
Devang Patel
6ef7517314 Find enclosing subprogram info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83922 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-12 23:11:24 +00:00
Devang Patel
1f03471a2d Set default location for a function if it is not set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83921 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-12 23:10:55 +00:00
Dale Johannesen
3a6b9eb868 Revert the kludge in 76703. I got a clean
bootstrap of FSF-style PPC, so there is some
reason to believe the original bug (which was
never analyzed) has been fixed, probably by
82266.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83871 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-12 18:49:00 +00:00
Dan Gohman
7fa50ede61 Remove a redundant member variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83857 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-12 16:44:10 +00:00
Nate Begeman
677c89d8bf More heuristics for Combiner-AA. Still catches all important cases, but
compile time penalty on gnugo, the worst case in MultiSource, is down to
about 2.5% from 30%


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83824 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-12 05:53:58 +00:00
Chris Lattner
f5e16139f2 Fix PR5087, patch by Jakub Staszak!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83822 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-12 04:22:44 +00:00
Dan Gohman
bcea859fc1 Create a new InstrEmitter class for translating SelectionDAG nodes
into MachineInstrs. This is mostly just moving the code from
ScheduleDAGSDNodesEmit.cpp into a new class. This decouples MachineInstr
emitting from scheduling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83699 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 01:32:21 +00:00
Dan Gohman
c81b783e27 Make getMachineNode return a MachineSDNode* instead of a generic SDNode*
since it won't do any folding. This will help avoid some inconvenient
casting.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83698 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 01:29:16 +00:00
Dan Gohman
5bf7c2a346 Fix a missing initialization of PostRAScheduler's AA member.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83695 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 00:15:38 +00:00
Dan Gohman
98976e4dcd The ScheduleDAG framework now requires an AliasAnalysis argument, though
it isn't needed in the ScheduleDAGSDNodes schedulers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83691 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-09 23:33:48 +00:00
Dan Gohman
a70dca156f Factor out LiveIntervalAnalysis' code to determine whether an instruction
is trivially rematerializable and integrate it into
TargetInstrInfo::isTriviallyReMaterializable. This way, all places that
need to know whether an instruction is rematerializable will get the
same answer.

This enables the useful parts of the aggressive-remat option by
default -- using AliasAnalysis to determine whether a memory location
is invariant, and removes the questionable parts -- rematting operations
with virtual register inputs that may not be live everywhere.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83687 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-09 23:27:56 +00:00
Devang Patel
ac1ceb3dd3 Extract scope information from the variable itself, instead of relying on alloca or llvm.dbg.declare location.
While recording beginning of a function, use scope info from the first location entry instead of just relying on first location entry itself.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83684 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-09 22:42:28 +00:00
Dan Gohman
599a87aca0 isTriviallyReMaterializable checks the
TargetInstrDesc::isRematerializable flag, so it isn't necessary to do
this check in its callers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83671 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-09 21:02:10 +00:00
Dan Gohman
91e69c3715 Add basic infrastructure and x86 support for preserving MachineMemOperand
information when unfolding memory references.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83656 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-09 18:10:05 +00:00
Devang Patel
c525472828 Check invalid debug info for enums. This may happen when underlyng enum is optimized away. Eventually DwarfChecker will clean this up during llvm verification stage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83655 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-09 17:51:49 +00:00
Jim Grosbach
71c8dc9b20 when previous scratch register is killed, flag the value as no longer tracking
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83653 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-09 17:33:33 +00:00
Evan Cheng
64efb555ce Give Dan and my recent changes, machine LICM is now code size neutral.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83624 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-09 06:31:25 +00:00
Evan Cheng
3dc326ba83 Fix a logic error that caused non-rematable loop invariants loads to be licm'ed out of loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83622 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-09 06:21:52 +00:00
Evan Cheng
35ca9203f2 Reset kill markers after live interval is reconstructed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83608 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-09 01:17:11 +00:00
Evan Cheng
9c8068078b Remove code that makes no sense.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83589 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-08 22:42:35 +00:00
Devang Patel
85d29e2de3 Clear variable debug info map at the end of the function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83571 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-08 20:41:17 +00:00