From: Andrea Di Biagio Date: Fri, 31 May 2019 18:01:42 +0000 (+0000) Subject: [MCA] Remove unused fields from BottleneckAnalysis. NFC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9f2f0e22e439c047e4b93f23b0c61e4d17e59781;p=llvm [MCA] Remove unused fields from BottleneckAnalysis. NFC This should appease the buildbots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362251 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/llvm-mca/Views/BottleneckAnalysis.cpp b/tools/llvm-mca/Views/BottleneckAnalysis.cpp index ea2cb71bae7..cde896fbb5f 100644 --- a/tools/llvm-mca/Views/BottleneckAnalysis.cpp +++ b/tools/llvm-mca/Views/BottleneckAnalysis.cpp @@ -205,12 +205,10 @@ void DependencyGraph::addDepImpl(SmallVectorImpl &Vec, } BottleneckAnalysis::BottleneckAnalysis(const MCSubtargetInfo &sti, - MCInstPrinter &Printer, - ArrayRef Sequence, - unsigned Executions) - : STI(sti), MCIP(Printer), Tracker(STI.getSchedModel()), - DG(Sequence.size()), Source(Sequence), Iterations(Executions), - TotalCycles(0), PressureIncreasedBecauseOfResources(false), + ArrayRef Sequence) + : STI(sti), Tracker(STI.getSchedModel()), DG(Sequence.size()), + Source(Sequence), TotalCycles(0), + PressureIncreasedBecauseOfResources(false), PressureIncreasedBecauseOfRegisterDependencies(false), PressureIncreasedBecauseOfMemoryDependencies(false), SeenStallCycles(false), BPI() {} @@ -356,7 +354,6 @@ void BottleneckAnalysis::printView(raw_ostream &OS) const { printBottleneckHints(TempStream); TempStream.flush(); OS << Buffer; - LLVM_DEBUG(DG.dump(OS, MCIP)); } } // namespace mca. diff --git a/tools/llvm-mca/Views/BottleneckAnalysis.h b/tools/llvm-mca/Views/BottleneckAnalysis.h index c9f4865e960..4c4dc193e13 100644 --- a/tools/llvm-mca/Views/BottleneckAnalysis.h +++ b/tools/llvm-mca/Views/BottleneckAnalysis.h @@ -149,7 +149,7 @@ public: void dumpMemDeps(raw_ostream &OS) const; void dumpResDeps(raw_ostream &OS) const; - void dump(raw_ostream &OS, llvm::MCInstPrinter &MCIP) const { + void dump(raw_ostream &OS, MCInstPrinter &MCIP) const { dumpRegDeps(OS, MCIP); dumpMemDeps(OS); dumpResDeps(OS); @@ -160,12 +160,10 @@ public: /// A view that collects and prints a few performance numbers. class BottleneckAnalysis : public View { const MCSubtargetInfo &STI; - MCInstPrinter &MCIP; PressureTracker Tracker; DependencyGraph DG; ArrayRef Source; - unsigned Iterations; unsigned TotalCycles; bool PressureIncreasedBecauseOfResources; @@ -192,15 +190,18 @@ class BottleneckAnalysis : public View { void printBottleneckHints(raw_ostream &OS) const; public: - BottleneckAnalysis(const MCSubtargetInfo &STI, MCInstPrinter &MCIP, - ArrayRef Sequence, unsigned Iterations); + BottleneckAnalysis(const MCSubtargetInfo &STI, ArrayRef Sequence); void onCycleEnd() override; void onEvent(const HWStallEvent &Event) override { SeenStallCycles = true; } void onEvent(const HWPressureEvent &Event) override; void onEvent(const HWInstructionEvent &Event) override; - void printView(llvm::raw_ostream &OS) const override; + void printView(raw_ostream &OS) const override; + +#ifndef NDEBUG + void dump(raw_ostream &OS, MCInstPrinter &MCIP) const { DG.dump(OS, MCIP); } +#endif }; } // namespace mca diff --git a/tools/llvm-mca/llvm-mca.cpp b/tools/llvm-mca/llvm-mca.cpp index 75886a6b31b..a875c70e17f 100644 --- a/tools/llvm-mca/llvm-mca.cpp +++ b/tools/llvm-mca/llvm-mca.cpp @@ -487,8 +487,7 @@ int main(int argc, char **argv) { llvm::make_unique(SM, Insts, DispatchWidth)); if (EnableBottleneckAnalysis) - Printer.addView(llvm::make_unique( - *STI, *IP, Insts, S.getNumIterations())); + Printer.addView(llvm::make_unique(*STI, Insts)); if (PrintInstructionInfoView) Printer.addView(