projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5757876
)
Restrict machine cse to really trivial coalescing. Leave the heavy lifting to a real...
author
Evan Cheng
<evan.cheng@apple.com>
Mon, 8 Mar 2010 23:28:08 +0000
(23:28 +0000)
committer
Evan Cheng
<evan.cheng@apple.com>
Mon, 8 Mar 2010 23:28:08 +0000
(23:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98007
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/MachineCSE.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/MachineCSE.cpp
b/lib/CodeGen/MachineCSE.cpp
index b376e3d05fee9257a96b1eee9c4638f85ff1e393..ce8ebbc601092404d4d5a245927fcabccadfc9db 100644
(file)
--- a/
lib/CodeGen/MachineCSE.cpp
+++ b/
lib/CodeGen/MachineCSE.cpp
@@
-91,7
+91,10
@@
bool MachineCSE::PerformTrivialCoalescing(MachineInstr *MI,
unsigned SrcReg, DstReg, SrcSubIdx, DstSubIdx;
if (TII->isMoveInstr(*DefMI, SrcReg, DstReg, SrcSubIdx, DstSubIdx) &&
TargetRegisterInfo::isVirtualRegister(SrcReg) &&
+ MRI->getRegClass(SrcReg) == MRI->getRegClass(Reg) &&
!SrcSubIdx && !DstSubIdx) {
+ DEBUG(dbgs() << "Coalescing: " << *DefMI);
+ DEBUG(dbgs() << "*** to: " << *MI);
MO.setReg(SrcReg);
DefMI->eraseFromParent();
++NumCoalesces;