[llvm] r362251 - [MCA] Remove unused fields from BottleneckAnalysis. NFC
Andrea Di Biagio via llvm-commits
llvm-commits at lists.llvm.org
Fri May 31 11:01:43 PDT 2019
Author: adibiagio
Date: Fri May 31 11:01:42 2019
New Revision: 362251
URL: http://llvm.org/viewvc/llvm-project?rev=362251&view=rev
Log:
[MCA] Remove unused fields from BottleneckAnalysis. NFC
This should appease the buildbots.
Modified:
llvm/trunk/tools/llvm-mca/Views/BottleneckAnalysis.cpp
llvm/trunk/tools/llvm-mca/Views/BottleneckAnalysis.h
llvm/trunk/tools/llvm-mca/llvm-mca.cpp
Modified: llvm/trunk/tools/llvm-mca/Views/BottleneckAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/Views/BottleneckAnalysis.cpp?rev=362251&r1=362250&r2=362251&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/Views/BottleneckAnalysis.cpp (original)
+++ llvm/trunk/tools/llvm-mca/Views/BottleneckAnalysis.cpp Fri May 31 11:01:42 2019
@@ -205,12 +205,10 @@ void DependencyGraph::addDepImpl(SmallVe
}
BottleneckAnalysis::BottleneckAnalysis(const MCSubtargetInfo &sti,
- MCInstPrinter &Printer,
- ArrayRef<MCInst> Sequence,
- unsigned Executions)
- : STI(sti), MCIP(Printer), Tracker(STI.getSchedModel()),
- DG(Sequence.size()), Source(Sequence), Iterations(Executions),
- TotalCycles(0), PressureIncreasedBecauseOfResources(false),
+ ArrayRef<MCInst> 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_o
printBottleneckHints(TempStream);
TempStream.flush();
OS << Buffer;
- LLVM_DEBUG(DG.dump(OS, MCIP));
}
} // namespace mca.
Modified: llvm/trunk/tools/llvm-mca/Views/BottleneckAnalysis.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/Views/BottleneckAnalysis.h?rev=362251&r1=362250&r2=362251&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/Views/BottleneckAnalysis.h (original)
+++ llvm/trunk/tools/llvm-mca/Views/BottleneckAnalysis.h Fri May 31 11:01:42 2019
@@ -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<MCInst> 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<MCInst> Sequence, unsigned Iterations);
+ BottleneckAnalysis(const MCSubtargetInfo &STI, ArrayRef<MCInst> 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
Modified: llvm/trunk/tools/llvm-mca/llvm-mca.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/llvm-mca.cpp?rev=362251&r1=362250&r2=362251&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/llvm-mca.cpp (original)
+++ llvm/trunk/tools/llvm-mca/llvm-mca.cpp Fri May 31 11:01:42 2019
@@ -487,8 +487,7 @@ int main(int argc, char **argv) {
llvm::make_unique<mca::SummaryView>(SM, Insts, DispatchWidth));
if (EnableBottleneckAnalysis)
- Printer.addView(llvm::make_unique<mca::BottleneckAnalysis>(
- *STI, *IP, Insts, S.getNumIterations()));
+ Printer.addView(llvm::make_unique<mca::BottleneckAnalysis>(*STI, Insts));
if (PrintInstructionInfoView)
Printer.addView(
More information about the llvm-commits
mailing list