aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/StrongPHIElimination.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Replace copyRegToReg with COPY everywhere in lib/CodeGen except for FastISel.Jakob Stoklund Olesen2010-07-101-10/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108062 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't track kills in VNInfo. Use interval ends instead.Jakob Stoklund Olesen2010-06-251-3/+0
| | | | | | | | | | | | The VNInfo.kills vector was almost unused except for all the code keeping it updated. The few places using it were easily rewritten to check for interval ends instead. The two new methods LiveInterval::killedAt and killedInRange are replacements. This brings us down to 3 independent data structures tracking kills. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106905 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a DebugLoc argument to TargetInstrInfo::copyRegToReg, so that itDan Gohman2010-05-061-4/+4
| | | | | | | doesn't have to guess. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103194 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix "the the" and similar typos.Dan Gohman2010-02-101-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95781 91177308-0d34-0410-b5e6-96231b3b80d8
* move target-independent opcodes out of TargetInstrInfoChris Lattner2010-02-091-7/+6
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95687 91177308-0d34-0410-b5e6-96231b3b80d8
* Change errs() to dbgs().David Greene2010-01-051-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92596 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert accidental commit.Bill Wendling2009-12-171-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91635 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn off critical edge splitting for landing pads. The introduction of aBill Wendling2009-12-171-1/+1
| | | | | | | | | | | non-landing pad basic block as the successor to a block that ends in an unconditional jump will cause block folding to remove the added block as a successor. Thus eventually removing it AND the landing pad entirely. Critical edge splitting is an optimization, so we can safely turn it off when dealing with landing pads. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91634 91177308-0d34-0410-b5e6-96231b3b80d8
* The Indexes Patch.Lang Hames2009-11-031-27/+28
| | | | | | | | | | | | | | | | | | This introduces a new pass, SlotIndexes, which is responsible for numbering instructions for register allocation (and other clients). SlotIndexes numbering is designed to match the existing scheme, so this patch should not cause any changes in the generated code. For consistency, and to avoid naming confusion, LiveIndex has been renamed SlotIndex. The processImplicitDefs method of the LiveIntervals analysis has been moved into its own pass so that it can be run prior to SlotIndexes. This was necessary to match the existing numbering scheme. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85979 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove includes of Support/Compiler.h that are no longer needed after theNick Lewycky2009-10-251-1/+0
| | | | | | | VISIBILITY_HIDDEN removal. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85043 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85042 91177308-0d34-0410-b5e6-96231b3b80d8
* Oops. Renamed remaining MachineInstrIndex references.Lang Hames2009-10-031-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83255 91177308-0d34-0410-b5e6-96231b3b80d8
* Renamed MachineInstrIndex to LiveIndex.Lang Hames2009-10-031-9/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83254 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed static qualifier from a few index related methods. These methods may ↵Lang Hames2009-09-091-9/+8
| | | | | | require a LiveIntervals instance in future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81374 91177308-0d34-0410-b5e6-96231b3b80d8
* Replaces uses of unsigned for indexes in LiveInterval and VNInfo withLang Hames2009-09-041-16/+15
| | | | | | | | | a new class, MachineInstrIndex, which hides arithmetic details from most clients. This is a step towards allowing the register allocator to update/insert code during allocation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81040 91177308-0d34-0410-b5e6-96231b3b80d8
* remove a few DOUTs here and there.Chris Lattner2009-08-231-9/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79832 91177308-0d34-0410-b5e6-96231b3b80d8
* Modified VNInfo. The "copy" member is now a union which holds the copy for a ↵Lang Hames2009-08-101-2/+2
| | | | | | register interval, or the defining register for a stack interval. Access is via getCopy/setCopy and getReg/setReg. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78620 91177308-0d34-0410-b5e6-96231b3b80d8
* Use setPreservesAll and setPreservesCFG in CodeGen passes.Dan Gohman2009-07-311-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77754 91177308-0d34-0410-b5e6-96231b3b80d8
* Improved tracking of value number kills. VN kills are now representedLang Hames2009-07-091-2/+2
| | | | | | | | | | | | | | as an (index,bool) pair. The bool flag records whether the kill is a PHI kill or not. This code will be used to enable splitting of live intervals containing PHI-kills. A slight change to live interval weights introduced an extra spill into lsr-code-insertion (outside the critical sections). The test condition has been updated to reflect this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75097 91177308-0d34-0410-b5e6-96231b3b80d8
* VNInfo cleanup.Lang Hames2009-06-171-7/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73634 91177308-0d34-0410-b5e6-96231b3b80d8
* Update to in-place spilling framework. Includes live interval scaling and ↵Lang Hames2009-06-021-1/+1
| | | | | | trivial rewriter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72729 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in live-in detection that caused lost-copy problems to show up.Owen Anderson2008-10-121-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57424 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix compilation error on MSVC.Argyrios Kyrtzidis2008-10-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57046 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch the MachineOperand accessors back to the short names likeDan Gohman2008-10-031-1/+1
| | | | | | | isReg, etc., from isRegister, etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57006 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a multimap rather than a map for holding the list of copies to insert, ↵Owen Anderson2008-10-021-12/+19
| | | | | | | | | | | so we don't lose copies when two of them have the same source. I don't know what I was thinking when I wrote this originally. Note: There's probably a more efficient way to do this, but I need to think about it some more, and about what determinism guarantees need to be present. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56964 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark merged-in VNInfo's as being PHIKilled.Owen Anderson2008-09-301-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56893 91177308-0d34-0410-b5e6-96231b3b80d8
* We don't need to insert copies for implicit_def's.Owen Anderson2008-09-261-1/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56674 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix off-by-one error when updating live intervals.Owen Anderson2008-09-241-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56567 91177308-0d34-0410-b5e6-96231b3b80d8
* Add initial support for inserting last minute copies.Owen Anderson2008-09-231-28/+53
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56485 91177308-0d34-0410-b5e6-96231b3b80d8
* Significant improvements to the logic for merging live intervals. This code ↵Owen Anderson2008-09-221-15/+53
| | | | | | | | | | can't just use LI::MergeValueAsValue, as its behavior in the presence of overlapping ranges isn't what StrongPHIElimination wants. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56472 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55779 91177308-0d34-0410-b5e6-96231b3b80d8
* Use empty() instead of begin() == end().Dan Gohman2008-08-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54780 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of unused variable.Owen Anderson2008-08-131-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54742 91177308-0d34-0410-b5e6-96231b3b80d8
* 1) Merge entire live intervals instead of parts of them.Owen Anderson2008-08-131-62/+36
| | | | | | | 2) Conditionalize temporary insertion if we don't need it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54741 91177308-0d34-0410-b5e6-96231b3b80d8
* Do a dominator walk when scheduling copies, rather than a DFS on the CFG. ↵Owen Anderson2008-08-071-14/+44
| | | | | | | | | Also, fix a few problems when creating live intervals for temporaries created by phi elimination. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54483 91177308-0d34-0410-b5e6-96231b3b80d8
* Correct handle cases where two phis are coalesced together, and correct ↵Owen Anderson2008-08-061-6/+39
| | | | | | | | | break up the case where two different phis want to coalesce with the same vreg. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54426 91177308-0d34-0410-b5e6-96231b3b80d8
* We don't need to try to coalesce input vregs that are the same as the output ↵Owen Anderson2008-08-061-0/+7
| | | | | | vreg. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54422 91177308-0d34-0410-b5e6-96231b3b80d8
* Only trim a live interval if the register is not used after the PHI node.Owen Anderson2008-08-061-2/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54421 91177308-0d34-0410-b5e6-96231b3b80d8
* Oops, we were already checking for dead phis. Handle this the proper way, then.Owen Anderson2008-08-051-22/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54371 91177308-0d34-0410-b5e6-96231b3b80d8
* We don't need to update live intervals for dead PHIs.Owen Anderson2008-08-051-29/+32
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54369 91177308-0d34-0410-b5e6-96231b3b80d8
* Use existing LiveInterval methods to simplify live interval merging. Thanks ↵Owen Anderson2008-07-301-31/+32
| | | | | | to Evan for pointing these out. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54225 91177308-0d34-0410-b5e6-96231b3b80d8
* When merging live intervals, we also need to merge in any live ranges that ↵Owen Anderson2008-07-301-13/+42
| | | | | | | | | are inputs to two-address instructions that themselves define a range we already care about. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54185 91177308-0d34-0410-b5e6-96231b3b80d8
* When merging a PHI operand's live interval into the PHI's live interval, we ↵Owen Anderson2008-07-291-9/+17
| | | | | | | | | need to merge over all liveranges in the operand's interval that share the relevant value number, not just the range that immediately precedes the PHI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54174 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the issues originally addressed in r54070. After thinking about it some ↵Owen Anderson2008-07-251-2/+19
| | | | | | | | | | | more, I realized that the right thing to do is to have StrongPHIElimination use its knowledge of the PHIs before they're erased to update the intervals appropriate. This is both simpler and more accurate than the alternative, which was having LIA figure it out when it renumbered things, plus it's just the right thing to do! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54077 91177308-0d34-0410-b5e6-96231b3b80d8
* In order to avoid reprocessing a register more than once, we need to add itOwen Anderson2008-07-251-1/+1
| | | | | | | to the handled set so it will get filtered out in future iterations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54065 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove live interval entries for an interval if we're eliminating its only VN.Owen Anderson2008-07-251-1/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54062 91177308-0d34-0410-b5e6-96231b3b80d8
* Store the predecessor MBB in the PHIUnion, rather than an index, since the ↵Owen Anderson2008-07-241-26/+28
| | | | | | indices will change after renumbering. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53985 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove debugging code.Owen Anderson2008-06-051-4/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52016 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the newly created helper on LiveIntervals.Owen Anderson2008-06-051-116/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52013 91177308-0d34-0410-b5e6-96231b3b80d8
* Correctly construct live intervals for the copies we inserted into the ↵Owen Anderson2008-06-041-1/+38
| | | | | | predecessors of a block containing a PHI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51950 91177308-0d34-0410-b5e6-96231b3b80d8