diff options
author | Kazu Hirata <kazu@google.com> | 2021-11-29 09:04:44 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2021-11-29 09:04:44 -0800 |
commit | f240e528cea25fd2a9ae01b1e1fe77f507ed7a2c (patch) | |
tree | 1950bdec40f448c08891c4853b9fc3e3af2cc815 /llvm/lib/CodeGen/MachinePipeliner.cpp | |
parent | c572eb1ad9d8a528bcaff0160888aff31b1f4b5f (diff) | |
download | llvm-f240e528cea25fd2a9ae01b1e1fe77f507ed7a2c.zip llvm-f240e528cea25fd2a9ae01b1e1fe77f507ed7a2c.tar.gz llvm-f240e528cea25fd2a9ae01b1e1fe77f507ed7a2c.tar.bz2 |
[llvm] Use range-based for loops (NFC)
Diffstat (limited to 'llvm/lib/CodeGen/MachinePipeliner.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachinePipeliner.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/MachinePipeliner.cpp b/llvm/lib/CodeGen/MachinePipeliner.cpp index 21be671..8d6459a 100644 --- a/llvm/lib/CodeGen/MachinePipeliner.cpp +++ b/llvm/lib/CodeGen/MachinePipeliner.cpp @@ -1519,9 +1519,8 @@ static bool pred_L(SetVector<SUnit *> &NodeOrder, SmallSetVector<SUnit *, 8> &Preds, const NodeSet *S = nullptr) { Preds.clear(); - for (SetVector<SUnit *>::iterator I = NodeOrder.begin(), E = NodeOrder.end(); - I != E; ++I) { - for (const SDep &Pred : (*I)->Preds) { + for (const SUnit *SU : NodeOrder) { + for (const SDep &Pred : SU->Preds) { if (S && S->count(Pred.getSUnit()) == 0) continue; if (ignoreDependence(Pred, true)) @@ -1530,7 +1529,7 @@ static bool pred_L(SetVector<SUnit *> &NodeOrder, Preds.insert(Pred.getSUnit()); } // Back-edges are predecessors with an anti-dependence. - for (const SDep &Succ : (*I)->Succs) { + for (const SDep &Succ : SU->Succs) { if (Succ.getKind() != SDep::Anti) continue; if (S && S->count(Succ.getSUnit()) == 0) |