diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-06-24 00:52:22 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-06-24 00:52:22 +0000 |
commit | b8ac3b035ba14663ebe57fde17f6a9f25134e005 (patch) | |
tree | bf6ada09be768cc78e9d9276f0d712058dea35e5 /lib/CodeGen/LiveIntervalAnalysis.cpp | |
parent | 407014f9a5f05f5a5867e5992a036358acc4a441 (diff) |
Revert "Replace a big gob of old coalescer logic with the new CoalescerPair class."
Whiny buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106710 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r-- | lib/CodeGen/LiveIntervalAnalysis.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index 6429fa2eb1..7d23cd0c9d 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -218,7 +218,10 @@ bool LiveIntervals::conflictsWithPhysReg(const LiveInterval &li, return false; } -bool LiveIntervals::conflictsWithAliasRef(LiveInterval &li, unsigned Reg, +/// conflictsWithSubPhysRegRef - Similar to conflictsWithPhysRegRef except +/// it checks for sub-register reference and it can check use as well. +bool LiveIntervals::conflictsWithSubPhysRegRef(LiveInterval &li, + unsigned Reg, bool CheckUse, SmallPtrSet<MachineInstr*,32> &JoinedCopies) { for (LiveInterval::Ranges::const_iterator I = li.ranges.begin(), E = li.ranges.end(); I != E; ++I) { @@ -236,11 +239,12 @@ bool LiveIntervals::conflictsWithAliasRef(LiveInterval &li, unsigned Reg, MachineOperand& MO = MI->getOperand(i); if (!MO.isReg()) continue; + if (MO.isUse() && !CheckUse) + continue; unsigned PhysReg = MO.getReg(); - if (PhysReg == 0 || PhysReg == Reg || - TargetRegisterInfo::isVirtualRegister(PhysReg)) + if (PhysReg == 0 || TargetRegisterInfo::isVirtualRegister(PhysReg)) continue; - if (tri_->regsOverlap(Reg, PhysReg)) + if (tri_->isSubRegister(Reg, PhysReg)) return true; } } @@ -1280,7 +1284,6 @@ bool LiveIntervals::anyKillInMBBAfterIdx(const LiveInterval &li, continue; SlotIndex KillIdx = VNI->kills[j]; - assert(getInstructionFromIndex(KillIdx) && "Dangling kill"); if (KillIdx > Idx && KillIdx <= End) return true; } |