mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-03 08:51:43 +00:00
MachineCSE: Hoist isConstantPhysReg out of the loop, it checks for overlaps already.
llvm-svn: 161729
This commit is contained in:
parent
b338b22e72
commit
28e133c8f2
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user