mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-16 14:31:59 +00:00
Simplify this code by using use_iterator instead of reg_iterator
and skipping the defs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82811 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
eef490f459
commit
29438d13e0
@ -70,10 +70,8 @@ bool MachineSinking::AllUsesDominatedByBlock(unsigned Reg,
|
||||
MachineBasicBlock *MBB) const {
|
||||
assert(TargetRegisterInfo::isVirtualRegister(Reg) &&
|
||||
"Only makes sense for vregs");
|
||||
for (MachineRegisterInfo::reg_iterator I = RegInfo->reg_begin(Reg),
|
||||
E = RegInfo->reg_end(); I != E; ++I) {
|
||||
if (I.getOperand().isDef()) continue; // ignore def.
|
||||
|
||||
for (MachineRegisterInfo::use_iterator I = RegInfo->use_begin(Reg),
|
||||
E = RegInfo->use_end(); I != E; ++I) {
|
||||
// Determine the block of the use.
|
||||
MachineInstr *UseInst = &*I;
|
||||
MachineBasicBlock *UseBlock = UseInst->getParent();
|
||||
|
Loading…
x
Reference in New Issue
Block a user