diff options
author | Owen Anderson <resistor@mac.com> | 2008-06-05 17:15:43 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2008-06-05 17:15:43 +0000 |
commit | 7399f22868d17689ed5e3c6806808998b9963d93 (patch) | |
tree | 3bcfd065eef0bcbe4eb31f1537b1c5049c92f0ae /lib | |
parent | 74e1ff5eacc54988d1dcf0935c3901300e07cd3c (diff) | |
download | external_llvm-7399f22868d17689ed5e3c6806808998b9963d93.zip external_llvm-7399f22868d17689ed5e3c6806808998b9963d93.tar.gz external_llvm-7399f22868d17689ed5e3c6806808998b9963d93.tar.bz2 |
Add a helper for constructing new live ranges that ended from an instruction to the end of its MBB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52012 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/LiveIntervalAnalysis.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index f184191..053e4d2 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -1830,3 +1830,18 @@ void LiveIntervals::spillPhysRegAroundRegDefsUses(const LiveInterval &li, } } } + +LiveRange LiveIntervals::addLiveRangeToEndOfBlock(unsigned reg, + MachineInstr* startInst) { + LiveInterval& Interval = getOrCreateInterval(reg); + VNInfo* VN = Interval.getNextValue( + getInstructionIndex(startInst) + InstrSlots::DEF, + startInst, getVNInfoAllocator()); + VN->hasPHIKill = true; + VN->kills.push_back(getMBBEndIdx(startInst->getParent())); + LiveRange LR(getInstructionIndex(startInst) + InstrSlots::DEF, + getMBBEndIdx(startInst->getParent()) + 1, VN); + Interval.addRange(LR); + + return LR; +} |