mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
convert another operand loop to iterator formulation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51661 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8370d38ade
commit
3e93e630aa
@ -244,9 +244,9 @@ void BVNImpl::visitGetElementPtrInst(GetElementPtrInst &I) {
|
||||
|
||||
// Try to pick a local operand if possible instead of a constant or a global
|
||||
// that might have a lot of uses.
|
||||
for (unsigned i = 1, e = I.getNumOperands(); i != e; ++i)
|
||||
if (isa<Instruction>(I.getOperand(i)) || isa<Argument>(I.getOperand(i))) {
|
||||
Op = I.getOperand(i);
|
||||
for (User::op_iterator i = I.op_begin() + 1, e = I.op_end(); i != e; ++i)
|
||||
if (isa<Instruction>(*i) || isa<Argument>(*i)) {
|
||||
Op = *i;
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user