summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2019-03-27 15:41:53 +0000
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2019-03-27 15:41:53 +0000
commit333a3264f472acf5dac949e23f43cc9fa04ba817 (patch)
treeb80ac0398951ac0b8944a5a7fb21219e1229fe4a /llvm
parentbbc59d8d0d091f3ae0856e9cc2155e8f30deacdd (diff)
downloadbcm5719-llvm-333a3264f472acf5dac949e23f43cc9fa04ba817.tar.gz
bcm5719-llvm-333a3264f472acf5dac949e23f43cc9fa04ba817.zip
[MCA][Pipeline] Don't visit stages in reverse order when calling method cycleEnd(). NFCI
There is no reason why stages should be visited in reverse order. This patch allows the definition of stages that push instructions forward from their cycleEnd() routine. llvm-svn: 357074
Diffstat (limited to 'llvm')
-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