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.
|
||||
Users &DominatedUsers = IPI->second;
|
||||
for (Users::iterator UseIt = DominatedUsers.begin(),
|
||||
EndIt = DominatedUsers.end();
|
||||
UseIt != EndIt; ++UseIt) {
|
||||
for (Value::user_iterator Use : DominatedUsers) {
|
||||
#ifndef NDEBUG
|
||||
assert((DT.dominates(LoadedCst, cast<Instruction>(**UseIt)) ||
|
||||
(isa<PHINode>(**UseIt) &&
|
||||
DT.dominates(LoadedCst, findInsertionPoint(*UseIt)))) &&
|
||||
assert((DT.dominates(LoadedCst, cast<Instruction>(*Use)) ||
|
||||
(isa<PHINode>(*Use) &&
|
||||
DT.dominates(LoadedCst, findInsertionPoint(Use)))) &&
|
||||
"Inserted definition does not dominate all its uses!");
|
||||
#endif
|
||||
DEBUG(dbgs() << "Use to update " << UseIt->getOperandNo() << ":");
|
||||
DEBUG((*UseIt)->print(dbgs()));
|
||||
DEBUG(dbgs() << "Use to update " << Use.getOperandNo() << ":");
|
||||
DEBUG(Use->print(dbgs()));
|
||||
DEBUG(dbgs() << '\n');
|
||||
(*UseIt)->setOperand(UseIt->getOperandNo(), LoadedCst);
|
||||
Use->setOperand(Use.getOperandNo(), LoadedCst);
|
||||
++NumPromotedUses;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user