|
LLVM
3.7.0
|
A trace ensemble is a collection of traces selected using the same strategy, for example 'minimum resource height'. More...
#include <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 | |
| virtual const MachineBasicBlock * | pickTracePred (const MachineBasicBlock *)=0 |
| virtual const MachineBasicBlock * | pickTraceSucc (const MachineBasicBlock *)=0 |
| Ensemble (MachineTraceMetrics *) | |
| 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 301 of file MachineTraceMetrics.h.
|
explicitprotected |
Definition at line 145 of file MachineTraceMetrics.cpp.
References llvm::TargetSchedModel::getNumProcResourceKinds(), MTM, and llvm::SmallVectorImpl< T >::resize().
|
virtual |
Definition at line 154 of file MachineTraceMetrics.cpp.
|
protected |
Definition at line 232 of file MachineTraceMetrics.cpp.
References llvm::MachineBasicBlock::getNumber(), and llvm::MachineTraceMetrics::TraceBlockInfo::hasValidDepth().
|
protected |
Definition at line 241 of file MachineTraceMetrics.cpp.
References llvm::MachineBasicBlock::getNumber(), and llvm::MachineTraceMetrics::TraceBlockInfo::hasValidHeight().
|
protected |
Definition at line 157 of file MachineTraceMetrics.cpp.
|
pure virtual |
|
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 254 of file MachineTraceMetrics.cpp.
References 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 267 of file MachineTraceMetrics.cpp.
References 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 1134 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 498 of file MachineTraceMetrics.cpp.
References 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 1264 of file MachineTraceMetrics.cpp.
References getName().
Referenced by llvm::operator<<().
| void MachineTraceMetrics::Ensemble::verify | ( | ) | const |
Definition at line 561 of file MachineTraceMetrics.cpp.
References 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 318 of file MachineTraceMetrics.h.
Referenced by Ensemble().
1.8.6