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:
cfc0ad6
)
MachineCSE: Hoist isConstantPhysReg out of the loop, it checks for overlaps already.
author
Benjamin Kramer
<benny.kra@googlemail.com>
Sat, 11 Aug 2012 20:42:59 +0000
(20:42 +0000)
committer
Benjamin Kramer
<benny.kra@googlemail.com>
Sat, 11 Aug 2012 20:42:59 +0000
(20:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161729
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 993975ef0ece2b320a5c6ec4b0c1207887881736..896461fd194b52936db2b67755f419337cf91cfe 100644
(file)
--- a/
lib/CodeGen/MachineCSE.cpp
+++ b/
lib/CodeGen/MachineCSE.cpp
@@
-215,11
+215,10
@@
bool MachineCSE::hasLivePhysRegDefUses(const MachineInstr *MI,
if (MO.isDef() &&
(MO.isDead() || isPhysDefTriviallyDead(Reg, I, MBB->end())))
continue;
- for (MCRegAliasIterator AI(Reg, TRI, true); AI.isValid(); ++AI) {
- // Reading constant physregs is ok.
-
if (!MRI->isConstantPhysReg(*AI, *MBB->getParent())
)
+ // 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);
}