diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-07-27 23:58:38 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-07-27 23:58:38 +0000 |
commit | 0563369755667638f9b9606ca320f579725ea11c (patch) | |
tree | 51043bc9bf67ea56df6f21337980252d303f7f52 /llvm/lib/CodeGen/MachineTraceMetrics.h | |
parent | 1152202cc2f3d69411d764a25d9573d94f4263ba (diff) | |
download | bcm5719-llvm-0563369755667638f9b9606ca320f579725ea11c.tar.gz bcm5719-llvm-0563369755667638f9b9606ca320f579725ea11c.zip |
Add more debug output to MachineTraceMetrics.
llvm-svn: 160905
Diffstat (limited to 'llvm/lib/CodeGen/MachineTraceMetrics.h')
-rw-r--r-- | llvm/lib/CodeGen/MachineTraceMetrics.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineTraceMetrics.h b/llvm/lib/CodeGen/MachineTraceMetrics.h index 26136fa9ee9..40da2729328 100644 --- a/llvm/lib/CodeGen/MachineTraceMetrics.h +++ b/llvm/lib/CodeGen/MachineTraceMetrics.h @@ -105,9 +105,11 @@ public: /// block in a trace ensemble. struct TraceBlockInfo { /// Trace predecessor, or NULL for the first block in the trace. + /// Valid when hasValidDepth(). const MachineBasicBlock *Pred; /// Trace successor, or NULL for the last block in the trace. + /// Valid when hasValidHeight(). const MachineBasicBlock *Succ; /// The block number of the head of the trace. (When hasValidDepth()). @@ -139,6 +141,8 @@ public: /// Invalidate height resources when a block below this one has changed. void invalidateHeight() { InstrHeight = ~0u; } + + void print(raw_ostream&) const; }; /// A trace represents a plausible sequence of executed basic blocks that @@ -180,7 +184,8 @@ public: public: virtual ~Ensemble(); - virtual const char *getName() =0; + virtual const char *getName() const =0; + void print(raw_ostream&) const; void invalidate(const MachineBasicBlock *MBB); /// Get the trace that passes through MBB. @@ -219,6 +224,11 @@ inline raw_ostream &operator<<(raw_ostream &OS, return OS; } +inline raw_ostream &operator<<(raw_ostream &OS, + const MachineTraceMetrics::Ensemble &En) { + En.print(OS); + return OS; +} } // end namespace llvm #endif |