summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2015-01-21 18:50:21 +0000
committerMatthias Braun <matze@braunis.de>2015-01-21 18:50:21 +0000
commitcfb8ad29b525298fb853f4bfaae97af062eb376e (patch)
tree4cd337774d1f8e82a12bda2ce92c5614be541cfc /llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
parent1002baf7b908cd1f683fd714e24dc4a7448447e2 (diff)
downloadbcm5719-llvm-cfb8ad29b525298fb853f4bfaae97af062eb376e.tar.gz
bcm5719-llvm-cfb8ad29b525298fb853f4bfaae97af062eb376e.zip
LiveIntervalAnalysis: Factor out code to update liveness on physreg def removal
This cleans up code and is more in line with the general philosophy of modifying LiveIntervals through LiveIntervalAnalysis instead of changing them directly. llvm-svn: 226687
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveIntervalAnalysis.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
index 36aeaa176a2..48daf2ccd06 100644
--- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -1367,3 +1367,11 @@ LiveIntervals::repairIntervalsInRange(MachineBasicBlock *MBB,
repairOldRegInRange(Begin, End, endIdx, LI, Reg);
}
}
+
+void LiveIntervals::removePhysRegDefAt(unsigned Reg, SlotIndex Pos) {
+ for (MCRegUnitIterator Units(Reg, TRI); Units.isValid(); ++Units) {
+ if (LiveRange *LR = getCachedRegUnit(*Units))
+ if (VNInfo *VNI = LR->getVNInfoAt(Pos))
+ LR->removeValNo(VNI);
+ }
+}
OpenPOWER on IntegriCloud