summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-mca/lib/Pipeline.cpp
diff options
context:
space:
mode:
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2018-10-24 19:37:45 +0000
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2018-10-24 19:37:45 +0000
commitcd4deea1c4e84187c109349f5c34fd579932bb60 (patch)
treea84beaa988054e1f7a26c3e59e0bd49bfd40627c /llvm/tools/llvm-mca/lib/Pipeline.cpp
parent536916898388e10fdfe02d8f8ef61fe9b75f62a0 (diff)
downloadbcm5719-llvm-cd4deea1c4e84187c109349f5c34fd579932bb60.tar.gz
bcm5719-llvm-cd4deea1c4e84187c109349f5c34fd579932bb60.zip
[llvm-mca] Simplify the logic in FetchStage. NFCI
Only method 'getNextInstruction()' needs to interact with the SourceMgr. llvm-svn: 345185
Diffstat (limited to 'llvm/tools/llvm-mca/lib/Pipeline.cpp')
-rw-r--r--llvm/tools/llvm-mca/lib/Pipeline.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/tools/llvm-mca/lib/Pipeline.cpp b/llvm/tools/llvm-mca/lib/Pipeline.cpp
index 2d9aa6b2a31..ad49522ad79 100644
--- a/llvm/tools/llvm-mca/lib/Pipeline.cpp
+++ b/llvm/tools/llvm-mca/lib/Pipeline.cpp
@@ -39,13 +39,14 @@ bool Pipeline::hasWorkToProcess() {
Error Pipeline::run() {
assert(!Stages.empty() && "Unexpected empty pipeline found!");
- while (hasWorkToProcess()) {
+ do {
notifyCycleBegin();
if (Error Err = runCycle())
return Err;
notifyCycleEnd();
++Cycles;
- }
+ } while (hasWorkToProcess());
+
return ErrorSuccess();
}
OpenPOWER on IntegriCloud