mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-17 06:33:21 +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 {
|
MachineBasicBlock *MBB) const {
|
||||||
assert(TargetRegisterInfo::isVirtualRegister(Reg) &&
|
assert(TargetRegisterInfo::isVirtualRegister(Reg) &&
|
||||||
"Only makes sense for vregs");
|
"Only makes sense for vregs");
|
||||||
for (MachineRegisterInfo::reg_iterator I = RegInfo->reg_begin(Reg),
|
for (MachineRegisterInfo::use_iterator I = RegInfo->use_begin(Reg),
|
||||||
E = RegInfo->reg_end(); I != E; ++I) {
|
E = RegInfo->use_end(); I != E; ++I) {
|
||||||
if (I.getOperand().isDef()) continue; // ignore def.
|
|
||||||
|
|
||||||
// Determine the block of the use.
|
// Determine the block of the use.
|
||||||
MachineInstr *UseInst = &*I;
|
MachineInstr *UseInst = &*I;
|
||||||
MachineBasicBlock *UseBlock = UseInst->getParent();
|
MachineBasicBlock *UseBlock = UseInst->getParent();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user