projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
misched: ILP scheduler for experimental heuristics.
[oota-llvm.git]
/
lib
/
CodeGen
/
MachineCSE.cpp
diff --git
a/lib/CodeGen/MachineCSE.cpp
b/lib/CodeGen/MachineCSE.cpp
index 5153abbc4e1160589ca47bc47923408d3b5ed4a2..896461fd194b52936db2b67755f419337cf91cfe 100644
(file)
--- a/
lib/CodeGen/MachineCSE.cpp
+++ b/
lib/CodeGen/MachineCSE.cpp
@@
-215,8
+215,10
@@
bool MachineCSE::hasLivePhysRegDefUses(const MachineInstr *MI,
if (MO.isDef() &&
(MO.isDead() || isPhysDefTriviallyDead(Reg, I, MBB->end())))
continue;
if (MO.isDef() &&
(MO.isDead() || isPhysDefTriviallyDead(Reg, I, MBB->end())))
continue;
- for (MCRegAliasIterator AI(Reg, TRI, true); AI.isValid(); ++AI)
- PhysRefs.insert(*AI);
+ // Reading constant physregs is ok.
+ if (!MRI->isConstantPhysReg(Reg, *MBB->getParent()))
+ for (MCRegAliasIterator AI(Reg, TRI, true); AI.isValid(); ++AI)
+ PhysRefs.insert(*AI);
if (MO.isDef())
PhysDefs.push_back(Reg);
}
if (MO.isDef())
PhysDefs.push_back(Reg);
}