aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LiveRangeCalc.cpp
AgeCommit message (Collapse)AuthorFilesLines
2014-04-22[Modules] Remove potential ODR violations by sinking the DEBUG_TYPEChandler Carruth1-1/+2
define below all header includes in the lib/CodeGen/... tree. While the current modules implementation doesn't check for this kind of ODR violation yet, it is likely to grow support for it in the future. It also removes one layer of macro pollution across all the included headers. Other sub-trees will follow. llvm-svn: 206837
2014-04-14[C++11] More 'nullptr' conversion. In some cases just using a boolean check ↵Craig Topper1-4/+4
instead of comparing to nullptr. llvm-svn: 206142
2014-03-17Switch a number of loops in lib/CodeGen over to range-based for-loops, now thatOwen Anderson1-10/+8
the MachineRegisterInfo iterators are compatible with it. llvm-svn: 204075
2014-03-13Phase 2 of the great MachineRegisterInfo cleanup. This time, we're changingOwen Anderson1-4/+4
operator* on the by-operand iterators to return a MachineOperand& rather than a MachineInstr&. At this point they almost behave like normal iterators! Again, this requires making some existing loops more verbose, but should pave the way for the big range-based for-loop cleanups in the future. llvm-svn: 203865
2014-03-02[C++11] Replace llvm::tie with std::tie.Benjamin Kramer1-4/+4
The old implementation is no longer needed in C++11. llvm-svn: 202644
2013-10-10Work on LiveRange instead of LiveInterval where possibleMatthias Braun1-30/+26
Also change some pointer arguments to references at some places where 0-pointers are not allowed. llvm-svn: 192396
2013-10-10Rename LiveRange to LiveInterval::SegmentMatthias Braun1-2/+2
The Segment struct contains a single interval; multiple instances of this struct are used to construct a live range, but the struct is not a live range by itself. llvm-svn: 192392
2013-02-20Copy single reaching defs directly into the LiveInterval.Jakob Stoklund Olesen1-34/+60
When findReachingDefs() finds that only one value can reach the basic block, just copy the work list of visited blocks directly into the live interval. Sort the block list and use a LiveRangeUpdater to make the bulk add fast. When multiple reaching defs are found, transfer the work list to the updateSSA() work list as before. Also use LiveRangeUpdater in updateLiveIns() following updateSSA(). This makes live interval analysis more than 3x faster on one huge test case. llvm-svn: 175685
2012-09-06Clear kill flags while computing live ranges.Jakob Stoklund Olesen1-1/+5
Kill flags are difficult to maintain, and liveness queries are better handled by live intervals. Kill flags are reinserted after register allocation by addKillFlags(). llvm-svn: 163334
2012-07-27Eliminate the IS_PHI_DEF flag and VNInfo::setIsPHIDef().Jakob Stoklund Olesen1-3/+1
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. llvm-svn: 160893
2012-07-13Be more verbose when detecting dominance problems.Jakob Stoklund Olesen1-5/+22
Catch uses of undefined physregs that haven't been added to basic block live-in lists. Run the verifier to pinpoint the problem. Also run the verifier when a virtual register use is not jointly dominated by defs. llvm-svn: 160207
2012-06-05Implement LiveRangeCalc::extendToUses() and createDeadDefs().Jakob Stoklund Olesen1-0/+66
These LiveRangeCalc methods are to be used when computing a live range from scratch. llvm-svn: 158027
2012-06-04Pass context pointers to LiveRangeCalc::reset().Jakob Stoklund Olesen1-20/+19
Remove the same pointers from all the other LiveRangeCalc functions, simplifying the interface. llvm-svn: 157941
2012-02-04Don't store COPY pointers in VNInfo.Jakob Stoklund Olesen1-1/+1
If a value is defined by a COPY, that instuction can easily and cheaply be found by getInstructionFromIndex(VNI->def). This reduces the size of VNInfo from 24 to 16 bytes, and improves llc compile time by 3%. llvm-svn: 149763
2011-12-20Fix assert condition.Lang Hames1-1/+1
llvm-svn: 146987
2011-09-13Switch extendInBlock() to take a kill slot instead of the last use slot.Jakob Stoklund Olesen1-4/+3
Three out of four clients prefer this interface which is consistent with extendIntervalEndTo() and LiveRangeCalc::extend(). llvm-svn: 139604
2011-09-13Unbreak msvc.NAKAMURA Takumi1-1/+1
llvm-svn: 139581
2011-09-13Extract live range calculations from SplitKit.Jakob Stoklund Olesen1-0/+271
SplitKit will soon need two copies of these data structures, and the algorithms will also be useful when LiveIntervalAnalysis becomes independent of LiveVariables. llvm-svn: 139572