summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/VirtRegRewriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add MachineBasicBlock::getName, and use it in place of getBasicBlock()->getName.Jakob Stoklund Olesen2009-11-201-1/+1
| | | | | | Fix debug code that assumes getBasicBlock never returns NULL. llvm-svn: 89428
* Fixed the in-place spiller and trivial rewriter, which had been broken by ↵Lang Hames2009-11-181-10/+21
| | | | | | the recent SlotIndexes work. llvm-svn: 89238
* Added getSubRegIndex(A,B) that returns subreg index of A to B. Use it to ↵Evan Cheng2009-11-141-5/+2
| | | | | | replace broken code in VirtRegRewriter. llvm-svn: 88753
* - Change TargetInstrInfo::reMaterialize to pass in TargetRegisterInfo.Evan Cheng2009-11-141-2/+2
| | | | | | | | - If destination is a physical register and it has a subreg index, use the sub-register instead. This fixes PR5423. llvm-svn: 88745
* Fix PR5412: Fix an inverted check and another missing sub-register check.Evan Cheng2009-11-141-9/+30
| | | | llvm-svn: 88738
* Fix PR5411. Bug in UpdateKills. A reg def partially define its super-registers.Evan Cheng2009-11-131-0/+4
| | | | llvm-svn: 88719
* Set the ReloadReuse AsmPrinter flag where appropriate.David Greene2009-11-121-0/+3
| | | | llvm-svn: 87030
* When there is a 2-instruction spill sequence, recordDale Johannesen2009-10-291-2/+3
| | | | | | | | the second (store) instruction in SpillSlotToUsesMap consistently. I don't think this matters functionally, but it's cleaner and Evan wants it this way. llvm-svn: 85463
* When we generate spill code, then decide we don't needDale Johannesen2009-10-281-1/+4
| | | | | | | | | | to spill after all, we weren't handling 2-instruction spill sequences correctly (PPC Altivec). We need to remove the store in this case. Removing the other instruction(s) would be goodness but is not needed for correctness, and isn't done here. 7331562. llvm-svn: 85437
* - Revert some changes from 85044, 85045, and 85047 that broke x86_64 tests andEvan Cheng2009-10-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | bootstrapping. It's not safe to leave identity subreg_to_reg and insert_subreg around. - Relax register scavenging to allow use of partially "not-live" registers. It's common for targets to operate on registers where the top bits are undef. e.g. s0 = d0 = insert_subreg d0<undef>, s0, 1 ... = d0 When the insert_subreg is eliminated by the coalescer, the scavenger used to complain. The previous fix was to keep to insert_subreg around. But that's brittle and it's overly conservative when we want to use the scavenger to allocate registers. It's actually legal and desirable for other instructions to use the "undef" part of d0. e.g. s0 = d0 = insert_subreg d0<undef>, s0, 1 ... s1 = = s1 = d0 We probably need add a "partial-undef" marker on machine operand so the machine verifier would not complain. llvm-svn: 85091
* Use isIdentityCopy. Fix a bozo bug (flipped condition) in InvalidateRegDef.Evan Cheng2009-10-251-5/+5
| | | | llvm-svn: 85047
* 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-4/+4
| | | | | | | 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
* Revert the kludge in 76703. I got a cleanDale Johannesen2009-10-121-2/+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. llvm-svn: 83871
* Remove some unused variables and methods warned about byDuncan Sands2009-09-061-2/+1
| | | | | | icc (#177, partial). Patch by Erick Tryzelaar. llvm-svn: 81106
* Fixed a test that ensures the LocalRewriter does not attempt toLang Hames2009-09-031-1/+1
| | | | | | | | | avoid reloads by reusing clobbered registers. This was causing issues in 256.bzip2 when compiled with PIC for a while (starting at r78217), though the problem has since been masked. llvm-svn: 80872
* Fix PR4753.Jakob Stoklund Olesen2009-08-231-1/+15
| | | | | | | | When undoing a reuse in ReuseInfo::GetRegForReload, check if it was only a sub-register being used. The MachineOperand::getSubReg() method is only valid for virtual registers, so we have to recover the sub-register index manually. llvm-svn: 79855
* Kill off more cerr/cout uses and prune includes a bit.Benjamin Kramer2009-08-231-1/+7
| | | | llvm-svn: 79852
* remove some DOUTsChris Lattner2009-08-231-57/+62
| | | | llvm-svn: 79812
* Update LocalRewriter::DistanceMap when inserting stack loads.Jakob Stoklund Olesen2009-08-151-0/+3
| | | | | | | | In the included test case, a stack load was not included in DistanceMap. That caused TransferDeadness to ignore the instruction, leading to a scavenger assert. llvm-svn: 79090
* Fix a bunch of namespace pollution.Dan Gohman2009-08-071-2/+16
| | | | llvm-svn: 78363
* Add reload and remat backscheduling. This is disabled by default. UseDavid Greene2009-07-281-26/+150
| | | | | | -schedule-spills=true to enable. llvm-svn: 77327
* More migration to raw_ostream, the water has dried up around the iostream hole.Daniel Dunbar2009-07-251-5/+7
| | | | | | | | | | - 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
* Let each target determines whether a machine instruction is dead. If true, ↵Evan Cheng2009-07-221-25/+2
| | | | | | | | that allows late codeine passes to delete it. This is considered a workaround. The problem is some targets are not modeling side effects correctly. PPC is apparently one of those. This patch allows ppc llvm-gcc to bootstrap on Darwin. Once we find out which instruction definitions are wrong, we can remove the PPCInstrInfo workaround. llvm-svn: 76703
* Another rewriter bug exposed by recent coalescer changes. ↵Evan Cheng2009-07-211-23/+27
| | | | | | ReuseInfo::GetRegForReload() should make sure the "switched" register is in the desired register class. I'm surprised this hasn't caused more failures in the past. llvm-svn: 76558
* Enable cross register class coalescing.Evan Cheng2009-07-181-4/+35
| | | | llvm-svn: 76281
* Fix my brain cramp by inverting the assertion condition.Evan Cheng2009-07-171-3/+1
| | | | llvm-svn: 76131
* Disable this assert for now, it is firing on an llvm-gcc bootstrap. :(Daniel Dunbar2009-07-161-0/+2
| | | | llvm-svn: 76123
* Fix inverted preprocessor conditional.Daniel Dunbar2009-07-161-1/+1
| | | | llvm-svn: 76111
* Changed my mind. We now allow remat of instructions whose defs have subreg ↵Evan Cheng2009-07-161-1/+8
| | | | | | indices. llvm-svn: 76100
* Let callers decide the sub-register index on the def operand of ↵Evan Cheng2009-07-161-1/+1
| | | | | | | | rematerialized instructions. Avoid remat'ing instructions whose def have sub-register indices for now. It's just really really hard to get all the cases right. llvm-svn: 75900
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-4/+4
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-4/+5
| | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
* Remove TargetInstrInfo::CommuteChangesDestination and added ↵Evan Cheng2009-07-101-1/+27
| | | | | | findCommutedOpIndices which returns the operand indices which are swapped (when applicable). This allows for some code clean up and future enhancements. llvm-svn: 75264
* Handle IMPLICIT_DEF with isUndef operand marker, part 2. This patch moves ↵Evan Cheng2009-07-011-2/+6
| | | | | | the code to annotate machineoperands to LiveIntervalAnalysis. It also add markers for implicit_def that define physical registers. The rest, is just a lot of details. llvm-svn: 74580
* Add a bit IsUndef to MachineOperand. This indicates the def / use register ↵Evan Cheng2009-06-301-26/+22
| | | | | | | | | | operand is defined by an implicit_def. That means it can def / use any register and passes (e.g. register scavenger) can feel free to ignore them. The register allocator, when it allocates a register to a virtual register defined by an implicit_def, can allocate any physical register without worrying about overlapping live ranges. It should mark all of operands of the said virtual register so later passes will do the right thing. This is not the best solution. But it should be a lot less fragile to having the scavenger try to track what is defined by implicit_def. llvm-svn: 74518
* Removed SimpleRewriter.Lang Hames2009-06-041-82/+2
| | | | llvm-svn: 72880
* Fix for PR4225: When rewriter reuse a value in a physical register , it ↵Evan Cheng2009-06-031-5/+19
| | | | | | clear the register kill operand marker and its kill ops information. However, the cleared operand may be a def of a super-register. Clear the kill ops info for the super-register's sub-registers as well. llvm-svn: 72758
* Update to in-place spilling framework. Includes live interval scaling and ↵Lang Hames2009-06-021-3/+42
| | | | | | trivial rewriter. llvm-svn: 72729
* Fix PR4210. Rewritter should track and update kills of sub-registers as well.Evan Cheng2009-05-151-42/+63
| | | | llvm-svn: 71848
* Teach TransferDeadness to delete truly dead instructions if they do not ↵Evan Cheng2009-05-121-13/+37
| | | | | | produce side effects. llvm-svn: 71606
* Renamed Spiller classes (plus uses and related files) to VirtRegRewriter.Lang Hames2009-05-061-0/+2141
llvm-svn: 71057
OpenPOWER on IntegriCloud