|
LLVM
5.0.0
|
A trace ensemble is a collection of traces selected using the same strategy, for example 'minimum resource height'. More...
#include "llvm/CodeGen/MachineTraceMetrics.h"
Public Member Functions | |
| virtual | ~Ensemble () |
| virtual const char * | getName () const =0 |
| void | print (raw_ostream &) const |
| void | invalidate (const MachineBasicBlock *MBB) |
| Invalidate traces through BadMBB. More... | |
| void | verify () const |
| Trace | getTrace (const MachineBasicBlock *MBB) |
| Get the trace that passes through MBB. More... | |
Protected Member Functions | |
| Ensemble (MachineTraceMetrics *) | |
| virtual const MachineBasicBlock * | pickTracePred (const MachineBasicBlock *)=0 |
| virtual const MachineBasicBlock * | pickTraceSucc (const MachineBasicBlock *)=0 |
| const MachineLoop * | getLoopFor (const MachineBasicBlock *) const |
| const TraceBlockInfo * | getDepthResources (const MachineBasicBlock *) const |
| const TraceBlockInfo * | getHeightResources (const MachineBasicBlock *) const |
| ArrayRef< unsigned > | getProcResourceDepths (unsigned MBBNum) const |
| Get an array of processor resource depths for MBB. More... | |
| ArrayRef< unsigned > | getProcResourceHeights (unsigned MBBNum) const |
| Get an array of processor resource heights for MBB. More... | |
Protected Attributes | |
| MachineTraceMetrics & | MTM |
Friends | |
| class | Trace |
A trace ensemble is a collection of traces selected using the same strategy, for example 'minimum resource height'.
There is one trace for every block in the function.
Definition at line 305 of file MachineTraceMetrics.h.
|
explicitprotected |
Definition at line 156 of file MachineTraceMetrics.cpp.
References llvm::TargetSchedModel::getNumProcResourceKinds(), MTM, and llvm::SmallVectorImpl< T >::resize().
|
virtualdefault |
|
protected |
Definition at line 243 of file MachineTraceMetrics.cpp.
References llvm::MachineBasicBlock::getNumber(), and llvm::MachineTraceMetrics::TraceBlockInfo::hasValidDepth().
|
protected |
Definition at line 252 of file MachineTraceMetrics.cpp.
References llvm::MachineBasicBlock::getNumber(), and llvm::MachineTraceMetrics::TraceBlockInfo::hasValidHeight().
|
protected |
Definition at line 168 of file MachineTraceMetrics.cpp.
|
protected |
Get an array of processor resource depths for MBB.
Indexed by processor resource kind, this array contains the scaled processor resources consumed by all blocks preceding MBB in its trace. It does not include instructions in MBB.
Compare TraceBlockInfo::InstrDepth.
Definition at line 265 of file MachineTraceMetrics.cpp.
References assert(), and llvm::makeArrayRef().
|
protected |
Get an array of processor resource heights for MBB.
Indexed by processor resource kind, this array contains the scaled processor resources consumed by this block and all blocks following it in its trace.
Compare TraceBlockInfo::InstrHeight.
Definition at line 278 of file MachineTraceMetrics.cpp.
References assert(), and llvm::makeArrayRef().
| MachineTraceMetrics::Trace MachineTraceMetrics::Ensemble::getTrace | ( | const MachineBasicBlock * | MBB | ) |
Get the trace that passes through MBB.
The trace is computed on demand.
Definition at line 1159 of file MachineTraceMetrics.cpp.
References llvm::MachineBasicBlock::getNumber(), llvm::MachineTraceMetrics::TraceBlockInfo::hasValidDepth(), llvm::MachineTraceMetrics::TraceBlockInfo::hasValidHeight(), llvm::MachineTraceMetrics::TraceBlockInfo::HasValidInstrDepths, llvm::MachineTraceMetrics::TraceBlockInfo::HasValidInstrHeights, and llvm::MachineTraceMetrics::Trace.
| void MachineTraceMetrics::Ensemble::invalidate | ( | const MachineBasicBlock * | MBB | ) |
Invalidate traces through BadMBB.
Definition at line 522 of file MachineTraceMetrics.cpp.
References assert(), llvm::dbgs(), DEBUG, llvm::SmallVectorBase::empty(), getName(), llvm::MachineBasicBlock::getNumber(), llvm::MachineTraceMetrics::TraceBlockInfo::hasValidDepth(), llvm::MachineTraceMetrics::TraceBlockInfo::hasValidHeight(), I, llvm::MachineTraceMetrics::TraceBlockInfo::invalidateDepth(), llvm::MachineTraceMetrics::TraceBlockInfo::invalidateHeight(), llvm::MachineBasicBlock::isPredecessor(), llvm::MachineBasicBlock::isSuccessor(), llvm::SmallVectorImpl< T >::pop_back_val(), llvm::MachineTraceMetrics::TraceBlockInfo::Pred, llvm::MachineBasicBlock::predecessors(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::MachineTraceMetrics::TraceBlockInfo::Succ, and llvm::MachineBasicBlock::successors().
Referenced by llvm::MachineTraceMetrics::invalidate().
|
protectedpure virtual |
|
protectedpure virtual |
| void MachineTraceMetrics::Ensemble::print | ( | raw_ostream & | OS | ) | const |
Definition at line 1288 of file MachineTraceMetrics.cpp.
References getName().
Referenced by llvm::operator<<().
| void MachineTraceMetrics::Ensemble::verify | ( | ) | const |
Definition at line 585 of file MachineTraceMetrics.cpp.
References assert(), llvm::MachineBasicBlock::getNumber(), llvm::MachineTraceMetrics::TraceBlockInfo::hasValidDepth(), llvm::MachineTraceMetrics::TraceBlockInfo::hasValidHeight(), llvm::MachineBasicBlock::isPredecessor(), llvm::MachineBasicBlock::isSuccessor(), llvm::MachineTraceMetrics::TraceBlockInfo::Pred, and llvm::MachineTraceMetrics::TraceBlockInfo::Succ.
Referenced by llvm::MachineTraceMetrics::verifyAnalysis().
|
friend |
Definition at line 306 of file MachineTraceMetrics.h.
|
protected |
Definition at line 323 of file MachineTraceMetrics.h.
Referenced by Ensemble().
1.8.6