aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/LiveIntervalAnalysis.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Also compute register mask lists under -new-live-intervals.Jakob Stoklund Olesen2012-07-271-8/+34
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160898 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate the IS_PHI_DEF flag and VNInfo::setIsPHIDef().Jakob Stoklund Olesen2012-07-271-1/+0
| | | | | | | | A value number is a PHI def if and only if it begins at a block boundary. This can be derived from the def slot, a separate flag is not necessary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160893 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a -new-live-intervals experimental option.Jakob Stoklund Olesen2012-07-271-1/+36
| | | | | | | | | This option replaces the existing live interval computation with one based on LiveRangeCalc.cpp. The new algorithm does not depend on LiveVariables, and it can be run at any time, before or after leaving SSA form. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160892 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete a boring statistic.Jakob Stoklund Olesen2012-06-221-6/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159030 91177308-0d34-0410-b5e6-96231b3b80d8
* Store live intervals in an IndexedMap.Jakob Stoklund Olesen2012-06-221-14/+8
| | | | | | It is both smaller and faster than DenseMap. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159029 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify handleMove() a bit.Jakob Stoklund Olesen2012-06-221-4/+4
| | | | | | | There is no need to check for physreg live ranges. They don't exist any more. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159019 91177308-0d34-0410-b5e6-96231b3b80d8
* Stop computing physreg live ranges.Jakob Stoklund Olesen2012-06-221-189/+1
| | | | | | Everyone is using on-demand regunit ranges now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159018 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove LiveIntervals::trackingRegUnits().Jakob Stoklund Olesen2012-06-221-1/+1
| | | | | | | | | With regunit liveness permanently enabled, this function would always return true. Also remove now obsolete code for checking physreg interference. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159006 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the -live-regunits command line option.Jakob Stoklund Olesen2012-06-201-12/+4
| | | | | | Register allocators depend on it being permanently enabled now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158873 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some more LiveInterval enumerations.Jakob Stoklund Olesen2012-06-201-5/+3
| | | | | | Deterministically enumerate the virtual registers instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158872 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable register unit liveness by default.Jakob Stoklund Olesen2012-06-201-1/+1
| | | | | | Soon we won't need to compute live intervals for physical registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158865 91177308-0d34-0410-b5e6-96231b3b80d8
* Only update regunit live ranges that have been precomputed.Jakob Stoklund Olesen2012-06-201-4/+8
| | | | | | | | | | | Regunit live ranges are computed on demand, so when mi-sched calls handleMove, some regunits may not have live ranges yet. That makes updating them easier: Just skip the non-existing ranges. They will be computed correctly from the rescheduled machine code when they are needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158831 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete dead code.Jakob Stoklund Olesen2012-06-201-48/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158827 91177308-0d34-0410-b5e6-96231b3b80d8
* Add regunit liveness support to LiveIntervals::handleMove().Jakob Stoklund Olesen2012-06-191-43/+50
| | | | | | | When LiveIntervals is tracking fixed interference in regunits, make sure to update those intervals as well. Currently guarded by -live-regunits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158766 91177308-0d34-0410-b5e6-96231b3b80d8
* 80 col.Jakob Stoklund Olesen2012-06-191-7/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158755 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead debug option -disable-rematerialization.Jakob Stoklund Olesen2012-06-061-4/+0
| | | | | | | Remat has been stable for years, and it isn't done by LiveIntervalAnalysis any longer. (See LiveRangeEdit). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158079 91177308-0d34-0410-b5e6-96231b3b80d8
* Suppress -Wunused-variable in -Asserts buildMatt Beaumont-Gay2012-06-051-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158037 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify LiveInterval::print().Jakob Stoklund Olesen2012-06-051-12/+5
| | | | | | | | | | Don't print out the register number and spill weight, making the TRI argument unnecessary. This allows callers to interpret the reg field. It can currently be a virtual register, a physical register, a spill slot, or a register unit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158031 91177308-0d34-0410-b5e6-96231b3b80d8
* Add experimental support for register unit liveness.Jakob Stoklund Olesen2012-06-051-0/+130
| | | | | | | | | | | | | | | | Instead of computing a live interval per physreg, LiveIntervals can compute live intervals per register unit. This makes impossible the confusing situation where aliasing registers could have overlapping live intervals. It should also make fixed interferernce checking cheaper since registers have fewer register units than aliases. Live intervals for regunits are computed on demand, using MRI use-def chains and the new LiveRangeCalc class. Only regunits live in to ABI blocks are precomputed during LiveIntervals::runOnMachineFunction(). The regunit liveness computations don't depend on LiveVariables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158029 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the last remat-related code from LiveIntervalAnalysis.Jakob Stoklund Olesen2012-06-051-95/+0
| | | | | | Rematerialization is handled by LiveRangeEdit now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157974 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete dead code.Jakob Stoklund Olesen2012-06-041-8/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157963 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch LiveIntervals member variable to LLVM naming standards.Jakob Stoklund Olesen2012-06-041-57/+57
| | | | | | No functional change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157957 91177308-0d34-0410-b5e6-96231b3b80d8
* Clear the entering, exiting and internal ranges of a bundle before collectingLang Hames2012-05-291-0/+3
| | | | | | | | | | | | ranges for the instruction about to be bundled. This fixes a bug in an external project where an assertion was triggered due to spurious 'multiple defs' within the bundle. Patch by Ivan Llopard. Thanks Ivan! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157632 91177308-0d34-0410-b5e6-96231b3b80d8
* LiveRangeQuery simplifies shrinkToUses().Jakob Stoklund Olesen2012-05-201-10/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157145 91177308-0d34-0410-b5e6-96231b3b80d8
* LiveIntervalUpdate validators weren't recorded after the calls to ↵Pete Cooper2012-04-181-6/+6
| | | | | | std::for_each. Turns out std::for_each doesn't update the variable passed in for the functor but instead copy constructs a new one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155041 91177308-0d34-0410-b5e6-96231b3b80d8
* misched: fix LiveInterval update for bottom-up schedulingAndrew Trick2012-03-211-3/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153162 91177308-0d34-0410-b5e6-96231b3b80d8
* misched: fix LI update for bottom-up.Andrew Trick2012-03-211-1/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153158 91177308-0d34-0410-b5e6-96231b3b80d8
* Stop fixing bad machine code in LiveIntervalAnalysis.Jakob Stoklund Olesen2012-03-041-15/+3
| | | | | | | | The first def of a virtual register cannot also read the register. Assert on such bad machine code instead of trying to fix it. TwoAddressInstructionPass should never create code like that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152010 91177308-0d34-0410-b5e6-96231b3b80d8
* Move getBundleStart() into MachineInstrBundle.h.Jakob Stoklund Olesen2012-03-011-1/+1
| | | | | | | | | This allows the function to be inlined, and makes it suitable for use in getInstructionIndex(). Also provide a const version. C++ is great for touch typing practice. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151782 91177308-0d34-0410-b5e6-96231b3b80d8
* Add API "handleMoveIntoBundl" for updating liveness when moving instructions ↵Lang Hames2012-02-211-13/+68
| | | | | | | | | | | | | | into bundles. This method takes a bundle start and an MI being bundled, and makes the intervals for the MI's operands appear to start/end on the bundle start. Also fixes some minor cosmetic issues (whitespace, naming convention) in the HMEditor code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151099 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some bugs in HMEditor's moveAllOperandsInto logic.Lang Hames2012-02-211-9/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151006 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence operator precedence warning.Benjamin Kramer2012-02-191-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150921 91177308-0d34-0410-b5e6-96231b3b80d8
* Add machinery for pushing live ranges onto bundle starts while bundling.Lang Hames2012-02-191-2/+207
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150915 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify moveEnteringDownFrom rules.Lang Hames2012-02-191-11/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150914 91177308-0d34-0410-b5e6-96231b3b80d8
* Skip through instructions rather than operands when looking for last use slot.Lang Hames2012-02-191-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150912 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix TODO and trailing whitespace.Lang Hames2012-02-191-10/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150910 91177308-0d34-0410-b5e6-96231b3b80d8
* Defer sanity checks on live intervals until after all have been updated. ↵Lang Hames2012-02-191-171/+170
| | | | | | Hold (LiveInterval, LiveRange) pairs to update, rather than vregs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150909 91177308-0d34-0410-b5e6-96231b3b80d8
* Bring HMEditor into line with LLVM coding standards.Lang Hames2012-02-171-160/+163
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150851 91177308-0d34-0410-b5e6-96231b3b80d8
* Sink variable into assertMatt Beaumont-Gay2012-02-171-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150841 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for regmask slots to HMEditor. Also fixes a comment error.Lang Hames2012-02-171-3/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150840 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor 'handleMove' code in live intervals. Clients of LiveIntervals won't seeLang Hames2012-02-171-211/+245
| | | | | | | | | | any changes. Internally this adds a private inner class HMEditor, to LiveIntervals. HMEditor provides an API for updating live intervals when code is moved or bundled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150826 91177308-0d34-0410-b5e6-96231b3b80d8
* Oops - isRegLiveIntoSuccessor is used in non-assert builds now. Remove ↵Lang Hames2012-02-171-2/+0
| | | | | | NDEBUG guards. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150771 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn off assertion, conservatively compute liveness for live-in ↵Lang Hames2012-02-171-8/+10
| | | | | | un-allocatable registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150768 91177308-0d34-0410-b5e6-96231b3b80d8
* Make LiveIntervals::handleMove() bundle aware.Lang Hames2012-02-151-4/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150630 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix assertion condition.Lang Hames2012-02-151-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150627 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove overly conservative assert.Lang Hames2012-02-151-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150608 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't emit live ranges for physregs live-ins that are dead.Lang Hames2012-02-151-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150553 91177308-0d34-0410-b5e6-96231b3b80d8
* Disentangle moving a machine instr from updating LiveIntervals.Lang Hames2012-02-151-12/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150552 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the proper clobber check in handleLiveInRegister().Jakob Stoklund Olesen2012-02-141-1/+1
| | | | | | | | | | | | When a physreg is live in to a basic block, look for any instruction in the block that clobbers the physreg. The instruction doesn't have to properly redefine the register, any overlapping clobber is OK. This slightly changes live ranges when compiling with register masks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150528 91177308-0d34-0410-b5e6-96231b3b80d8
* Dump live intervals in numerical order.Jakob Stoklund Olesen2012-02-141-4/+15
| | | | | | The old DenseMap hashed order was very confusing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150527 91177308-0d34-0410-b5e6-96231b3b80d8