summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/RegAllocLocal.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove the local register allocator.Jakob Stoklund Olesen2010-06-151-1254/+0
| | | | | | Please use the fast allocator instead. llvm-svn: 106051
* Remember to update VirtRegLastUse when spilling without killing before a call.Jakob Stoklund Olesen2010-05-181-0/+10
| | | | llvm-svn: 104074
* RegAllocLocal can count copies tooJakob Stoklund Olesen2010-05-141-1/+4
| | | | llvm-svn: 103830
* Do not attempt copy coalescing if the source and dest sub-register indices ↵Evan Cheng2010-05-121-2/+4
| | | | | | do not match. llvm-svn: 103679
* Teach local regalloc about virtual registers with sub-indices.Evan Cheng2010-05-121-9/+37
| | | | llvm-svn: 103539
* Revert r103133 and add testcase from PR7066.Nick Lewycky2010-05-071-12/+2
| | | | llvm-svn: 103233
* Add argument TargetRegisterInfo to loadRegFromStackSlot and storeRegToStackSlot.Evan Cheng2010-05-061-2/+2
| | | | llvm-svn: 103193
* Fix PR6520. An earlyclobber physreg must not be allocated to anything else.Jakob Stoklund Olesen2010-05-051-2/+12
| | | | llvm-svn: 103133
* Remove preexisting kill flags in RegAllocLocal, just like LiveVariables does.Jakob Stoklund Olesen2010-05-031-1/+4
| | | | | | | This should make it possible to start producing kill flags in isel without breaking stuff. llvm-svn: 102976
* The local register allocator has to spill dirty callee saved registers before aJakob Stoklund Olesen2010-04-301-6/+33
| | | | | | | | | | call that might throw. The landing pad assumes that all registers are in stack slots. We used to spill those dirty CSRs after the call, and the stack slots would be wrong when arriving at the landing pad. llvm-svn: 102770
* Revert "Use a simpler data structure to calculate the least recently used ↵Jakob Stoklund Olesen2010-04-171-41/+112
| | | | | | | | register in RegAllocLocal." This reverts commit 101392. It broke a buildbot. llvm-svn: 101595
* Use a simpler data structure to calculate the least recently used register ↵Jakob Stoklund Olesen2010-04-161-112/+41
| | | | | | | | in RegAllocLocal. This makes the local register allocator about 20% faster. llvm-svn: 101574
* rename llvm::llvm_report_error -> llvm::report_fatal_errorChris Lattner2010-04-071-2/+2
| | | | llvm-svn: 100709
* reduce indentation, fit in 80 cols and various other cosmetic cleanups.Chris Lattner2010-03-311-284/+300
| | | | llvm-svn: 99989
* Add explicit braces to avoid ambiguous ‘else’.Dan Gohman2010-03-181-1/+2
| | | | llvm-svn: 98838
* Use getFirstTerminator().Bill Wendling2010-03-161-4/+4
| | | | llvm-svn: 98604
* When checking if something's killed, don't rely simply on whether it's marked asBill Wendling2010-03-161-8/+15
| | | | | | | "used outside of the block". If the block ends in a return, then it won't be used outside of it. llvm-svn: 98599
* Reapply 96294; now that I've gotten around to lookingDale Johannesen2010-02-161-4/+26
| | | | | | | at older buildbot messages, I see the failure predates this patch. llvm-svn: 96307
* Something broke. Hard to believe it was this patchDale Johannesen2010-02-161-26/+4
| | | | | | | but it's harder to believe it's the other candidate, so reverting. Temporarily I hope. llvm-svn: 96303
* More handling of DBG_VALUE.Dale Johannesen2010-02-151-4/+26
| | | | llvm-svn: 96294
* Ignore DBG_VALUE in a couple more places.Dale Johannesen2010-02-151-1/+4
| | | | llvm-svn: 96207
* Fix comments to reflect renaming elsewhere.Dale Johannesen2010-02-101-2/+2
| | | | llvm-svn: 95730
* move target-independent opcodes out of TargetInstrInfoChris Lattner2010-02-091-4/+4
| | | | | | | | | into TargetOpcodes.h. #include the new TargetOpcodes.h into MachineInstr. Add new inline accessors (like isPHI()) to MachineInstr, and start using them throughout the codebase. llvm-svn: 95687
* Reapply 95050 with a tweak to check the register class.Dale Johannesen2010-02-031-0/+16
| | | | llvm-svn: 95183
* Test revert 95050; there's a good chance it's causingDale Johannesen2010-02-021-14/+0
| | | | | | buildbot failure. llvm-svn: 95103
* Make local RA smarter about reusing input register of a copyDale Johannesen2010-02-021-0/+14
| | | | | | | as output. Needed for (functional) correctness in inline asm, and should be generally beneficial. 7361612. llvm-svn: 95050
* Fix a case where debug_value could affect codegen.Dale Johannesen2010-01-301-0/+12
| | | | llvm-svn: 94866
* Change errs() to dbgs().David Greene2010-01-051-17/+17
| | | | llvm-svn: 92595
* Do better with physical reg operands (typically, from inline asm)Dale Johannesen2009-12-161-16/+41
| | | | | | | | | | | | | | | | | | in local register allocator. If a reg-reg copy has a phys reg input and a virt reg output, and this is the last use of the phys reg, assign the phys reg to the virt reg. If a reg-reg copy has a phys reg output and we need to reload its spilled input, reload it directly into the phys reg than passing it through another reg. Following 76208, there is sometimes no dependency between the def of a phys reg and its use; this creates a window where that phys reg can be used for spilling (this is true in linear scan also). This is bad and needs to be fixed a better way, although 76208 works too well in practice to be reverted. However, there should normally be no spilling within inline asm blocks. The patch here goes a long way towards making this actually be true. llvm-svn: 91485
* Add a bool flag to StackObjects telling whether they reference spillDavid Greene2009-11-121-2/+2
| | | | | | | | | | | | | slots. The AsmPrinter will use this information to determine whether to print a spill/reload comment. Remove default argument values. It's too easy to pass a wrong argument value when multiple arguments have default values. Make everything explicit to trap bugs early. Update all targets to adhere to the new interfaces.. llvm-svn: 87022
* Remove includes of Support/Compiler.h that are no longer needed after theNick Lewycky2009-10-251-1/+0
| | | | | | VISIBILITY_HIDDEN removal. llvm-svn: 85043
* Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.Nick Lewycky2009-10-251-1/+1
| | | | | | | Chris claims we should never have visibility_hidden inside any .cpp file but that's still not true even after this commit. llvm-svn: 85042
* Distinquish stack slots from other stack objects. They (and fixed objects) ↵Evan Cheng2009-10-171-1/+1
| | | | | | get FixedStack PseudoSourceValues. llvm-svn: 84326
* Convert DOUT to DEBUG(errs()...).Bill Wendling2009-08-221-32/+37
| | | | llvm-svn: 79758
* Use setPreservesAll and setPreservesCFG in CodeGen passes.Dan Gohman2009-07-311-0/+1
| | | | llvm-svn: 77754
* More migration to raw_ostream, the water has dried up around the iostream hole.Daniel Dunbar2009-07-251-1/+1
| | | | | | | | | | - Some clients which used DOUT have moved to DEBUG. We are deprecating the "magic" DOUT behavior which avoided calling printing functions when the statement was disabled. In addition to being unnecessary magic, it had the downside of leaving code in -Asserts builds, and of hiding potentially unnecessary computations. llvm-svn: 77019
* Convert more assert(0)+abort() -> LLVM_UNREACHABLE,Torok Edwin2009-07-111-8/+14
| | | | | | and abort()/exit() -> llvm_report_error(). llvm-svn: 75363
* Fix pr4100. Do not remove no-op copies when they are dead. The registerBob Wilson2009-05-071-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | scavenger gets confused about register liveness if it doesn't see them. I'm not thrilled with this solution, but it only comes up when there are dead copies in the code, which is something that hopefully doesn't happen much. Here is what happens in pr4100: As shown in the following excerpt from the debug output of llc, the source of a move gets reloaded from the stack, inserting a new load instruction before the move. Since that source operand is a kill, the physical register is free to be reused for the destination of the move. The move ends up being a no-op, copying R3 to R3, so it is deleted. But, it leaves behind the load to reload %reg1028 into R3, and that load is not updated to show that it's destination operand (R3) is dead. The scavenger gets confused by that load because it thinks that R3 is live. Starting RegAlloc of: %reg1025<def,dead> = MOVr %reg1028<kill>, 14, %reg0, %reg0 Regs have values: Reloading %reg1028 into R3 Last use of R3[%reg1028], removing it from live set Assigning R3 to %reg1025 Register R3 [%reg1025] is never used, removing it from live set Alternative solutions might be either marking the load as dead, or zapping the load along with the no-op copy. I couldn't see an easy way to do either of those, though. llvm-svn: 71196
* Fix a comment (again).Bob Wilson2009-05-071-1/+1
| | | | llvm-svn: 71180
* Fix a comment.Bob Wilson2009-05-071-1/+1
| | | | llvm-svn: 71179
* Fix pr3954. The register scavenger asserts for inline assembly withBob Wilson2009-04-091-1/+1
| | | | | | | | | | | | register destinations that are tied to source operands. The TargetInstrDescr::findTiedToSrcOperand method silently fails for inline assembly. The existing MachineInstr::isRegReDefinedByTwoAddr was very close to doing what is needed, so this revision makes a few changes to that method and also renames it to isRegTiedToUseOperand (for consistency with the very similar isRegTiedToDefOperand and because it handles both two-address instructions and inline assembly with tied registers). llvm-svn: 68714
* Added MachineInstr::isRegTiedToDefOperand to check for two-addressness.Evan Cheng2009-03-191-1/+1
| | | | llvm-svn: 67335
* Local register allocator shouldn't assume only the entry and landing pad ↵Evan Cheng2009-01-291-16/+13
| | | | | | basic blocks have live-ins. llvm-svn: 63323
* Exit with nice warnings when register allocator run out of registers.Evan Cheng2009-01-291-40/+65
| | | | llvm-svn: 63267
* A slight compile time optimization. If the caller knows there isn't a free ↵Evan Cheng2009-01-291-6/+6
| | | | | | register getReg() should not call getFreeReg(). llvm-svn: 63263
* Change TargetInstrInfo::isMoveInstr to return source and destination ↵Evan Cheng2009-01-201-2/+3
| | | | | | sub-register indices as well. llvm-svn: 62600
* Drop the reg argument to isRegReDefinedByTwoAddr, which was redundant.Dan Gohman2008-12-051-1/+1
| | | | llvm-svn: 60586
* Minor fix debug for register allocation debug output.Matthijs Kooijman2008-11-241-2/+2
| | | | llvm-svn: 59961
* Fix command-line option printing to print two spaces where needed,Dan Gohman2008-10-141-1/+1
| | | | | | | | | instead of requiring all "short description" strings to begin with two spaces. This makes these strings less mysterious, and it fixes some cases where short description strings mistakenly did not begin with two spaces. llvm-svn: 57521
* Fix the case where an instruction is not properly marked as using all ↵Owen Anderson2008-10-081-1/+19
| | | | | | registers that alias its inputs. llvm-svn: 57286
OpenPOWER on IntegriCloud