Skip to content

Commit 8ec9840

Browse files
authored
[CodeGen] Add dump() to MachineTraceMetrics.h
To enhance debugging. Reviewers: arsenm, goldsteinn, RKSimon, dtcxzyw, asi-sc Reviewed By: dtcxzyw, RKSimon Pull Request: #97799
1 parent f926e19 commit 8ec9840

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

llvm/include/llvm/CodeGen/MachineTraceMetrics.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ class MachineTraceMetrics : public MachineFunctionPass {
243243
SmallVector<LiveInReg, 4> LiveIns;
244244

245245
void print(raw_ostream&) const;
246+
void dump() const { print(dbgs()); }
246247
};
247248

248249
/// InstrCycles represents the cycle height and depth of an instruction in a
@@ -271,6 +272,7 @@ class MachineTraceMetrics : public MachineFunctionPass {
271272
explicit Trace(Ensemble &te, TraceBlockInfo &tbi) : TE(te), TBI(tbi) {}
272273

273274
void print(raw_ostream&) const;
275+
void dump() const { print(dbgs()); }
274276

275277
/// Compute the total number of instructions in the trace.
276278
unsigned getInstrCount() const {
@@ -361,7 +363,8 @@ class MachineTraceMetrics : public MachineFunctionPass {
361363
virtual ~Ensemble();
362364

363365
virtual const char *getName() const = 0;
364-
void print(raw_ostream&) const;
366+
void print(raw_ostream &) const;
367+
void dump() const { print(dbgs()); }
365368
void invalidate(const MachineBasicBlock *MBB);
366369
void verify() const;
367370

0 commit comments

Comments
 (0)