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/RegisterCoalescer.cpp | |
parent | 407014f9a5f05f5a5867e5992a036358acc4a441 (diff) | |
download | external_llvm-b8ac3b035ba14663ebe57fde17f6a9f25134e005.tar.gz external_llvm-b8ac3b035ba14663ebe57fde17f6a9f25134e005.tar.bz2 external_llvm-b8ac3b035ba14663ebe57fde17f6a9f25134e005.zip |
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/RegisterCoalescer.cpp')
-rw-r--r-- | lib/CodeGen/RegisterCoalescer.cpp | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/lib/CodeGen/RegisterCoalescer.cpp b/lib/CodeGen/RegisterCoalescer.cpp index b943a271b6..b18f0957b6 100644 --- a/lib/CodeGen/RegisterCoalescer.cpp +++ b/lib/CodeGen/RegisterCoalescer.cpp @@ -63,7 +63,7 @@ bool CoalescerPair::isMoveInstr(const MachineInstr *MI, bool CoalescerPair::setRegisters(const MachineInstr *MI) { srcReg_ = dstReg_ = subIdx_ = 0; newRC_ = 0; - flipped_ = crossClass_ = false; + flipped_ = false; unsigned Src, Dst, SrcSub, DstSub; if (!isMoveInstr(MI, Src, Dst, SrcSub, DstSub)) @@ -78,7 +78,6 @@ bool CoalescerPair::setRegisters(const MachineInstr *MI) { std::swap(SrcSub, DstSub); flipped_ = true; } - origDstReg_ = Dst; const MachineRegisterInfo &MRI = MI->getParent()->getParent()->getRegInfo(); @@ -101,19 +100,11 @@ bool CoalescerPair::setRegisters(const MachineInstr *MI) { } else { // Both registers are virtual. - // Both registers have subreg indices. - if (SrcSub && DstSub) { - // For now we only handle the case of identical indices in commensurate - // registers: Dreg:ssub_1 + Dreg:ssub_1 -> Dreg - // FIXME: Handle Qreg:ssub_3 + Dreg:ssub_1 as QReg:dsub_1 + Dreg. - if (SrcSub != DstSub) - return false; - const TargetRegisterClass *SrcRC = MRI.getRegClass(Src); - const TargetRegisterClass *DstRC = MRI.getRegClass(Dst); - if (!getCommonSubClass(DstRC, SrcRC)) - return false; + // Identical sub to sub. + if (SrcSub == DstSub) SrcSub = DstSub = 0; - } + else if (SrcSub && DstSub) + return false; // FIXME: Qreg:ssub_3 + Dreg:ssub_1 => QReg:dsub_1 + Dreg. // There can be no SrcSub. if (SrcSub) { @@ -133,7 +124,6 @@ bool CoalescerPair::setRegisters(const MachineInstr *MI) { newRC_ = getCommonSubClass(DstRC, SrcRC); if (!newRC_) return false; - crossClass_ = newRC_ != DstRC || newRC_ != SrcRC; } // Check our invariants assert(TargetRegisterInfo::isVirtualRegister(Src) && "Src must be virtual"); |