diff options
author | Matthias Braun <matze@braunis.de> | 2015-01-21 18:50:21 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2015-01-21 18:50:21 +0000 |
commit | cfb8ad29b525298fb853f4bfaae97af062eb376e (patch) | |
tree | 4cd337774d1f8e82a12bda2ce92c5614be541cfc /llvm/lib/CodeGen/LiveIntervalAnalysis.cpp | |
parent | 1002baf7b908cd1f683fd714e24dc4a7448447e2 (diff) | |
download | llvm-cfb8ad29b525298fb853f4bfaae97af062eb376e.zip llvm-cfb8ad29b525298fb853f4bfaae97af062eb376e.tar.gz llvm-cfb8ad29b525298fb853f4bfaae97af062eb376e.tar.bz2 |
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.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp index 36aeaa1..48daf2c 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); + } +} |