From 8af3fe81eb94e71c4921ac246feaa76c47ecbf39 Mon Sep 17 00:00:00 2001 From: Andrea Di Biagio Date: Thu, 8 Mar 2018 16:08:43 +0000 Subject: [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 --- llvm/tools/llvm-mca/Backend.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'llvm/tools/llvm-mca/Backend.cpp') 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); } -- cgit v1.2.3