aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Report errors correctly for unselected target intrinsics.Jakob Stoklund Olesen2009-10-151-6/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84193 91177308-0d34-0410-b5e6-96231b3b80d8
* Make CodePlacementOpt align loops, rather than loop headers. TheDan Gohman2009-10-151-71/+30
| | | | | | | | | | | 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
* When LiveVariables is adding implicit-def to model "partial dead", add the ↵Evan Cheng2009-10-141-1/+12
| | | | | | 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
* Print earlyclobber for implicit-defs as well.Evan Cheng2009-10-141-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84152 91177308-0d34-0410-b5e6-96231b3b80d8
* Make loop not recalc getNumOperands() each time aroundJim Grosbach2009-10-141-3/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84138 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support to record DbgScope as inlined scope.Devang Patel2009-10-142-25/+44
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84134 91177308-0d34-0410-b5e6-96231b3b80d8
* quiet compiler warningJim Grosbach2009-10-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84133 91177308-0d34-0410-b5e6-96231b3b80d8
* I don't see any point in having both eh.selector.i32 and eh.selector.i64,Duncan Sands2009-10-144-29/+27
| | | | | | | | | | | | | | 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
* This remat entry is basically done. There are hooks to allow targetsDan Gohman2009-10-141-38/+0
| | | | | | | | | 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
* Add a few README.txt items.Dan Gohman2009-10-131-0/+29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84059 91177308-0d34-0410-b5e6-96231b3b80d8
* s/DebugLoc.CompileUnit/DebugLoc.Scope/gDevang Patel2009-10-135-22/+23
| | | | | | | | s/DebugLoc.InlinedLoc/DebugLoc.InlinedAtLoc/g git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84054 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce new convenience methods for sign extending orDuncan Sands2009-10-132-54/+22
| | | | | | | | | | | | | 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
* Add debugging output.David Goodwin2009-10-131-2/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84011 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a -Asserts warning.Daniel Dunbar2009-10-131-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83950 91177308-0d34-0410-b5e6-96231b3b80d8
* Find enclosing subprogram info.Devang Patel2009-10-121-1/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83922 91177308-0d34-0410-b5e6-96231b3b80d8
* Set default location for a function if it is not set.Devang Patel2009-10-121-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83921 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert the kludge in 76703. I got a cleanDale Johannesen2009-10-122-23/+25
| | | | | | | | | | | 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
* Remove a redundant member variable.Dan Gohman2009-10-121-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83857 91177308-0d34-0410-b5e6-96231b3b80d8
* More heuristics for Combiner-AA. Still catches all important cases, butNate Begeman2009-10-121-6/+19
| | | | | | | | 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
* Fix PR5087, patch by Jakub Staszak!Chris Lattner2009-10-121-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83822 91177308-0d34-0410-b5e6-96231b3b80d8
* Create a new InstrEmitter class for translating SelectionDAG nodesDan Gohman2009-10-105-183/+263
| | | | | | | | | 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
* Make getMachineNode return a MachineSDNode* instead of a generic SDNode*Dan Gohman2009-10-101-42/+53
| | | | | | | | 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
* Fix a missing initialization of PostRAScheduler's AA member.Dan Gohman2009-10-101-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83695 91177308-0d34-0410-b5e6-96231b3b80d8
* The ScheduleDAG framework now requires an AliasAnalysis argument, thoughDan Gohman2009-10-095-5/+5
| | | | | | | 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
* Factor out LiveIntervalAnalysis' code to determine whether an instructionDan Gohman2009-10-0912-116/+135
| | | | | | | | | | | | | | | 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
* Extract scope information from the variable itself, instead of relying on ↵Devang Patel2009-10-094-32/+41
| | | | | | | | | | 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
* isTriviallyReMaterializable checks theDan Gohman2009-10-094-7/+4
| | | | | | | | 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
* Add basic infrastructure and x86 support for preserving MachineMemOperandDan Gohman2009-10-091-0/+64
| | | | | | | information when unfolding memory references. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83656 91177308-0d34-0410-b5e6-96231b3b80d8
* Check invalid debug info for enums. This may happen when underlyng enum is ↵Devang Patel2009-10-091-2/+4
| | | | | | 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
* when previous scratch register is killed, flag the value as no longer trackingJim Grosbach2009-10-091-1/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83653 91177308-0d34-0410-b5e6-96231b3b80d8
* Give Dan and my recent changes, machine LICM is now code size neutral.Evan Cheng2009-10-091-4/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83624 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a logic error that caused non-rematable loop invariants loads to be ↵Evan Cheng2009-10-091-2/+1
| | | | | | licm'ed out of loop. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83622 91177308-0d34-0410-b5e6-96231b3b80d8
* Reset kill markers after live interval is reconstructed.Evan Cheng2009-10-091-6/+22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83608 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove code that makes no sense.Evan Cheng2009-10-081-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83589 91177308-0d34-0410-b5e6-96231b3b80d8
* Clear variable debug info map at the end of the function.Devang Patel2009-10-081-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83571 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a SelectionDAG getTargetInsertSubreg convenience function,Bob Wilson2009-10-081-0/+11
| | | | | | | similar to getTargetExtractSubreg. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83564 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not record line number to implicitly mark start of function if function ↵Devang Patel2009-10-082-12/+23
| | | | | | has arguments. Extra line number entries trip gdb in some cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83563 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a form of addPreserved which takes a string argument, to allow passesDan Gohman2009-10-081-12/+12
| | | | | | | | | to declare that they preserve other passes without needing to pull in additional header file or library dependencies. Convert MachineFunctionPass and CodeGenLICM to make use of this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83555 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-enable register scavenging in Thumb1 by default.Jim Grosbach2009-10-082-10/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83521 91177308-0d34-0410-b5e6-96231b3b80d8
* bugfix. The target may use virtual registers that aren't tracked for re-use ↵Jim Grosbach2009-10-082-20/+27
| | | | | | but are allocated by the scavenger. The re-use algorithm needs to watch for that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83519 91177308-0d34-0410-b5e6-96231b3b80d8
* reverting thumb1 scavenging default due to test failure while I figure out ↵Jim Grosbach2009-10-072-6/+10
| | | | | | what's up. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83501 91177308-0d34-0410-b5e6-96231b3b80d8
* second half of lazy liveness removal.Chris Lattner2009-10-071-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83500 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable thumb1 register scavenging by default.Jim Grosbach2009-10-072-10/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83496 91177308-0d34-0410-b5e6-96231b3b80d8
* grammarJim Grosbach2009-10-071-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83483 91177308-0d34-0410-b5e6-96231b3b80d8
* add initializers for clarity. Add missing assignment of PrevLastUseOp.Jim Grosbach2009-10-071-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83481 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove LazyLiveness from the tree. It doesn't work right now, and I'm not ↵Owen Anderson2009-10-071-168/+0
| | | | | | | | | going to have the time to finish it any time soon. If someone's interested it, they can resurrect it from SVN history. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83480 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace some code for aggressive-remat with MachineInstr::isInvariantLoad, andDan Gohman2009-10-071-23/+28
| | | | | | | teach it how to recognize invariant physical registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83476 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace TargetInstrInfo::isInvariantLoad and its target-specificDan Gohman2009-10-074-7/+48
| | | | | | | | | | implementations with a new MachineInstr::isInvariantLoad, which uses MachineMemOperands and is target-independent. This brings MachineLICM and other functionality to targets which previously lacked an isInvariantLoad implementation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83475 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a few simple MachineVerifier checks for MachineMemOperands.Dan Gohman2009-10-071-0/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83474 91177308-0d34-0410-b5e6-96231b3b80d8
* Add register-reuse to frame-index register scavenging. When a target usesJim Grosbach2009-10-073-22/+129
| | | | | | | | | | | | | | | | | | | | | | a virtual register to eliminate a frame index, it can return that register and the constant stored there to PEI to track. When scavenging to allocate for those registers, PEI then tracks the last-used register and value, and if it is still available and matches the value for the next index, reuses the existing value rather and removes the re-materialization instructions. Fancier tracking and adjustment of scavenger allocations to keep more values live for longer is possible, but not yet implemented and would likely be better done via a different, less special-purpose, approach to the problem. eliminateFrameIndex() is modified so the target implementations can return the registers they wish to be tracked for reuse. ARM Thumb1 implements and utilizes the new mechanism. All other targets are simply modified to adjust for the changed eliminateFrameIndex() prototype. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83467 91177308-0d34-0410-b5e6-96231b3b80d8