mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-13 09:33:50 +00:00
[ARM64,C++11] Range'ify another loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206539 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0a0d620db3
commit
e89024e4f9
@ -514,19 +514,17 @@ ARM64PromoteConstant::insertDefinitions(Constant *Cst,
|
|||||||
|
|
||||||
// Update the dominated uses.
|
// Update the dominated uses.
|
||||||
Users &DominatedUsers = IPI->second;
|
Users &DominatedUsers = IPI->second;
|
||||||
for (Users::iterator UseIt = DominatedUsers.begin(),
|
for (Value::user_iterator Use : DominatedUsers) {
|
||||||
EndIt = DominatedUsers.end();
|
|
||||||
UseIt != EndIt; ++UseIt) {
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
assert((DT.dominates(LoadedCst, cast<Instruction>(**UseIt)) ||
|
assert((DT.dominates(LoadedCst, cast<Instruction>(*Use)) ||
|
||||||
(isa<PHINode>(**UseIt) &&
|
(isa<PHINode>(*Use) &&
|
||||||
DT.dominates(LoadedCst, findInsertionPoint(*UseIt)))) &&
|
DT.dominates(LoadedCst, findInsertionPoint(Use)))) &&
|
||||||
"Inserted definition does not dominate all its uses!");
|
"Inserted definition does not dominate all its uses!");
|
||||||
#endif
|
#endif
|
||||||
DEBUG(dbgs() << "Use to update " << UseIt->getOperandNo() << ":");
|
DEBUG(dbgs() << "Use to update " << Use.getOperandNo() << ":");
|
||||||
DEBUG((*UseIt)->print(dbgs()));
|
DEBUG(Use->print(dbgs()));
|
||||||
DEBUG(dbgs() << '\n');
|
DEBUG(dbgs() << '\n');
|
||||||
(*UseIt)->setOperand(UseIt->getOperandNo(), LoadedCst);
|
Use->setOperand(Use.getOperandNo(), LoadedCst);
|
||||||
++NumPromotedUses;
|
++NumPromotedUses;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user