summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-mca/Views/TimelineView.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-mca/Views/TimelineView.h')
-rw-r--r--llvm/tools/llvm-mca/Views/TimelineView.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/llvm/tools/llvm-mca/Views/TimelineView.h b/llvm/tools/llvm-mca/Views/TimelineView.h
index a5d7765e20f..3dc3bfee773 100644
--- a/llvm/tools/llvm-mca/Views/TimelineView.h
+++ b/llvm/tools/llvm-mca/Views/TimelineView.h
@@ -135,23 +135,22 @@ class TimelineView : public View {
std::vector<TimelineViewEntry> Timeline;
struct WaitTimeEntry {
- unsigned Executions;
unsigned CyclesSpentInSchedulerQueue;
unsigned CyclesSpentInSQWhileReady;
unsigned CyclesSpentAfterWBAndBeforeRetire;
};
std::vector<WaitTimeEntry> WaitTime;
+ std::vector<std::pair<unsigned, unsigned>> UsedBuffer;
void printTimelineViewEntry(llvm::formatted_raw_ostream &OS,
const TimelineViewEntry &E, unsigned Iteration,
unsigned SourceIndex) const;
void printWaitTimeEntry(llvm::formatted_raw_ostream &OS,
- const WaitTimeEntry &E, unsigned Index) const;
+ const WaitTimeEntry &E, unsigned Index,
+ unsigned Executions) const;
const unsigned DEFAULT_ITERATIONS = 10;
- void initialize(unsigned MaxIterations);
-
// Display characters for the TimelineView report output.
struct DisplayChar {
static const char Dispatched = 'D';
@@ -165,15 +164,13 @@ class TimelineView : public View {
public:
TimelineView(const llvm::MCSubtargetInfo &sti, llvm::MCInstPrinter &Printer,
const SourceMgr &Sequence, unsigned MaxIterations,
- unsigned Cycles)
- : STI(sti), MCIP(Printer), AsmSequence(Sequence), CurrentCycle(0),
- MaxCycle(Cycles == 0 ? 80 : Cycles), LastCycle(0) {
- initialize(MaxIterations);
- }
+ unsigned Cycles);
// Event handlers.
void onCycleEnd() override { ++CurrentCycle; }
void onEvent(const HWInstructionEvent &Event) override;
+ void onReservedBuffers(const InstRef &IR,
+ llvm::ArrayRef<unsigned> Buffers) override;
// print functionalities.
void printTimeline(llvm::raw_ostream &OS) const;
OpenPOWER on IntegriCloud