diff options
author | Andrea Di Biagio <Andrea_DiBiagio@sn.scee.net> | 2018-03-08 16:08:43 +0000 |
---|---|---|
committer | Andrea Di Biagio <Andrea_DiBiagio@sn.scee.net> | 2018-03-08 16:08:43 +0000 |
commit | 8af3fe81eb94e71c4921ac246feaa76c47ecbf39 (patch) | |
tree | 7284415a8ba7bdbcfd4eb4c8c2584e9b74ca2fa4 /llvm/tools/llvm-mca/Backend.cpp | |
parent | b312b1396069203bb1cfd64a5c4c903b05d3cd6a (diff) | |
download | bcm5719-llvm-8af3fe81eb94e71c4921ac246feaa76c47ecbf39.tar.gz bcm5719-llvm-8af3fe81eb94e71c4921ac246feaa76c47ecbf39.zip |
[llvm-mca] Unify the API for the various views. NFCI
This allows the customization of the performance report.
Users can specify their own custom sequence of views.
Each view contributes a portion of the performance report generated by the
BackendPrinter.
Internally, class BackendPrinter keeps a sequence of views; views are printed
out in sequence when method 'printReport()' is called.
This patch addresses one of the two review comments from Clement in D43951.
llvm-svn: 327018
Diffstat (limited to 'llvm/tools/llvm-mca/Backend.cpp')
-rw-r--r-- | llvm/tools/llvm-mca/Backend.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/tools/llvm-mca/Backend.cpp b/llvm/tools/llvm-mca/Backend.cpp index 890cbc14d86..62e239524dd 100644 --- a/llvm/tools/llvm-mca/Backend.cpp +++ b/llvm/tools/llvm-mca/Backend.cpp @@ -31,12 +31,12 @@ void Backend::addEventListener(HWEventListener *Listener) { void Backend::runCycle(unsigned Cycle) { notifyCycleBegin(Cycle); - if (!SM->hasNext()) { + if (!SM.hasNext()) { notifyCycleEnd(Cycle); return; } - InstRef IR = SM->peekNext(); + InstRef IR = SM.peekNext(); const InstrDesc *Desc = &IB->getOrCreateInstrDesc(STI, *IR.second); while (DU->isAvailable(Desc->NumMicroOps) && DU->canDispatch(*Desc)) { Instruction *NewIS = IB->createInstruction(STI, *DU, IR.first, *IR.second); @@ -49,12 +49,12 @@ void Backend::runCycle(unsigned Cycle) { notifyInstructionExecuted(IR.first); // Check if we have dispatched all the instructions. - SM->updateNext(); - if (!SM->hasNext()) + SM.updateNext(); + if (!SM.hasNext()) break; // Prepare for the next round. - IR = SM->peekNext(); + IR = SM.peekNext(); Desc = &IB->getOrCreateInstrDesc(STI, *IR.second); } |