LLVM API Documentation
#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. | |
void | verify () const |
Trace | getTrace (const MachineBasicBlock *MBB) |
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 |
ArrayRef< unsigned > | getProcResourceHeights (unsigned MBBNum) const |
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.
MachineTraceMetrics::Ensemble::Ensemble | ( | MachineTraceMetrics * | ct | ) | [explicit, protected] |
Definition at line 146 of file MachineTraceMetrics.cpp.
References llvm::TargetSchedModel::getNumProcResourceKinds(), MTM, llvm::SmallVectorImpl< T >::resize(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
MachineTraceMetrics::Ensemble::~Ensemble | ( | ) | [virtual] |
Definition at line 155 of file MachineTraceMetrics.cpp.
const MachineTraceMetrics::TraceBlockInfo * MachineTraceMetrics::Ensemble::getDepthResources | ( | const MachineBasicBlock * | MBB | ) | const [protected] |
Definition at line 233 of file MachineTraceMetrics.cpp.
References llvm::MachineBasicBlock::getNumber(), and llvm::MachineTraceMetrics::TraceBlockInfo::hasValidDepth().
const MachineTraceMetrics::TraceBlockInfo * MachineTraceMetrics::Ensemble::getHeightResources | ( | const MachineBasicBlock * | MBB | ) | const [protected] |
Definition at line 242 of file MachineTraceMetrics.cpp.
References llvm::MachineBasicBlock::getNumber(), and llvm::MachineTraceMetrics::TraceBlockInfo::hasValidHeight().
const MachineLoop * MachineTraceMetrics::Ensemble::getLoopFor | ( | const MachineBasicBlock * | MBB | ) | const [protected] |
Definition at line 158 of file MachineTraceMetrics.cpp.
virtual const char* llvm::MachineTraceMetrics::Ensemble::getName | ( | ) | const [pure virtual] |
ArrayRef< unsigned > MachineTraceMetrics::Ensemble::getProcResourceDepths | ( | unsigned | MBBNum | ) | const [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 255 of file MachineTraceMetrics.cpp.
References llvm::makeArrayRef().
ArrayRef< unsigned > MachineTraceMetrics::Ensemble::getProcResourceHeights | ( | unsigned | MBBNum | ) | const [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 268 of file MachineTraceMetrics.cpp.
References llvm::makeArrayRef().
Get the trace that passes through MBB. The trace is computed on demand.
Definition at line 1137 of file MachineTraceMetrics.cpp.
References llvm::MachineBasicBlock::getNumber(), and llvm::MachineTraceMetrics::Trace.
void MachineTraceMetrics::Ensemble::invalidate | ( | const MachineBasicBlock * | MBB | ) |
Invalidate traces through BadMBB.
Definition at line 507 of file MachineTraceMetrics.cpp.
References llvm::dbgs(), DEBUG, llvm::SmallVectorBase::empty(), llvm::Intrinsic::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::pred_begin(), llvm::MachineBasicBlock::pred_end(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::MachineTraceMetrics::TraceBlockInfo::Succ, llvm::MachineBasicBlock::succ_begin(), and llvm::MachineBasicBlock::succ_end().
Referenced by llvm::MachineTraceMetrics::invalidate().
virtual const MachineBasicBlock* llvm::MachineTraceMetrics::Ensemble::pickTracePred | ( | const MachineBasicBlock * | ) | [protected, pure virtual] |
virtual const MachineBasicBlock* llvm::MachineTraceMetrics::Ensemble::pickTraceSucc | ( | const MachineBasicBlock * | ) | [protected, pure virtual] |
void MachineTraceMetrics::Ensemble::print | ( | raw_ostream & | OS | ) | const |
Definition at line 1263 of file MachineTraceMetrics.cpp.
References llvm::Intrinsic::getName(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
Referenced by llvm::operator<<().
void MachineTraceMetrics::Ensemble::verify | ( | ) | const |
Definition at line 572 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, llvm::SmallVectorTemplateCommon< T, typename >::size(), and llvm::MachineTraceMetrics::TraceBlockInfo::Succ.
Referenced by llvm::MachineTraceMetrics::verifyAnalysis().
friend class Trace [friend] |
Definition at line 306 of file MachineTraceMetrics.h.
Definition at line 318 of file MachineTraceMetrics.h.
Referenced by Ensemble().