summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MCA/Pipeline.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/MCA/Pipeline.cpp')
-rw-r--r--llvm/lib/MCA/Pipeline.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/MCA/Pipeline.cpp b/llvm/lib/MCA/Pipeline.cpp
index 5361f08f154..6860a8caf55 100644
--- a/llvm/lib/MCA/Pipeline.cpp
+++ b/llvm/lib/MCA/Pipeline.cpp
@@ -63,9 +63,9 @@ Error Pipeline::runCycle() {
Err = FirstStage.execute(IR);
// Update stages in preparation for a new cycle.
- for (auto I = Stages.rbegin(), E = Stages.rend(); I != E && !Err; ++I) {
- const std::unique_ptr<Stage> &S = *I;
- Err = S->cycleEnd();
+ for (const std::unique_ptr<Stage> &S : Stages) {
+ if (Err = S->cycleEnd())
+ break;
}
return Err;
OpenPOWER on IntegriCloud