class MachineTraceMetrics::Ensemble
Declaration
class MachineTraceMetrics::Ensemble { /* full declaration omitted */ };
Description
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.
Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:321
Member Variables
- private SmallVector< llvm::MachineTraceMetrics::TraceBlockInfo, 4> BlockInfo
- private DenseMap<const llvm::MachineInstr*, llvm::MachineTraceMetrics::InstrCycles> Cycles
- private SmallVector<unsigned int, 0> ProcResourceDepths
- private SmallVector<unsigned int, 0> ProcResourceHeights
- protected llvm::MachineTraceMetrics& MTM
Method Overview
- protected Ensemble(llvm::MachineTraceMetrics *)
- private void addLiveIns(const llvm::MachineInstr * DefMI, unsigned int DefOp, ArrayRef<const llvm::MachineBasicBlock *> Trace)
- private unsigned int computeCrossBlockCriticalPath(const llvm::MachineTraceMetrics::TraceBlockInfo &)
- private void computeDepthResources(const llvm::MachineBasicBlock *)
- private void computeHeightResources(const llvm::MachineBasicBlock *)
- private void computeInstrDepths(const llvm::MachineBasicBlock *)
- private void computeInstrHeights(const llvm::MachineBasicBlock *)
- private void computeTrace(const llvm::MachineBasicBlock *)
- protected const llvm::MachineTraceMetrics::TraceBlockInfo * getDepthResources(const llvm::MachineBasicBlock *) const
- protected const llvm::MachineTraceMetrics::TraceBlockInfo * getHeightResources(const llvm::MachineBasicBlock *) const
- protected const llvm::MachineLoop * getLoopFor(const llvm::MachineBasicBlock *) const
- public virtual const char * getName() const
- protected ArrayRef<unsigned int> getProcResourceDepths(unsigned int MBBNum) const
- protected ArrayRef<unsigned int> getProcResourceHeights(unsigned int MBBNum) const
- public llvm::MachineTraceMetrics::Trace getTrace(const llvm::MachineBasicBlock * MBB)
- public void invalidate(const llvm::MachineBasicBlock * MBB)
- protected virtual const llvm::MachineBasicBlock * pickTracePred(const llvm::MachineBasicBlock *)
- protected virtual const llvm::MachineBasicBlock * pickTraceSucc(const llvm::MachineBasicBlock *)
- public void print(llvm::raw_ostream &) const
- public void updateDepth(llvm::MachineTraceMetrics::TraceBlockInfo & TBI, const llvm::MachineInstr &, SparseSet<llvm::LiveRegUnit> & RegUnits)
- public void updateDepth(const llvm::MachineBasicBlock *, const llvm::MachineInstr &, SparseSet<llvm::LiveRegUnit> & RegUnits)
- public void updateDepths(MachineBasicBlock::iterator Start, MachineBasicBlock::iterator End, SparseSet<llvm::LiveRegUnit> & RegUnits)
- public void verify() const
- public virtual ~Ensemble()
Methods
¶Ensemble(llvm::MachineTraceMetrics*)
Ensemble(llvm::MachineTraceMetrics*)
Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:341
Parameters
¶void addLiveIns(
const llvm::MachineInstr* DefMI,
unsigned int DefOp,
ArrayRef<const llvm::MachineBasicBlock*>
Trace)
void addLiveIns(
const llvm::MachineInstr* DefMI,
unsigned int DefOp,
ArrayRef<const llvm::MachineBasicBlock*>
Trace)
Description
Assuming that the virtual register defined by DefMI:DefOp was used by Trace.back(), add it to the live-in lists of all the blocks in Trace. Stop when reaching the block that contains DefMI.
Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:335
Parameters
- const llvm::MachineInstr* DefMI
- unsigned int DefOp
- ArrayRef<const llvm::MachineBasicBlock*> Trace
¶unsigned int computeCrossBlockCriticalPath(
const llvm::MachineTraceMetrics::
TraceBlockInfo&)
unsigned int computeCrossBlockCriticalPath(
const llvm::MachineTraceMetrics::
TraceBlockInfo&)
Description
The length of the critical path through a trace is the maximum of two path lengths: 1. The maximum height+depth over all instructions in the trace center block. 2. The longest cross-block dependency chain. For small blocks, it is possible that the critical path through the trace doesn't include any instructions in the block. This function computes the second number from the live-in list of the center block.
Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:332
Parameters
¶void computeDepthResources(
const llvm::MachineBasicBlock*)
void computeDepthResources(
const llvm::MachineBasicBlock*)
Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:330
Parameters
- const llvm::MachineBasicBlock*
¶void computeHeightResources(
const llvm::MachineBasicBlock*)
void computeHeightResources(
const llvm::MachineBasicBlock*)
Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:331
Parameters
- const llvm::MachineBasicBlock*
¶void computeInstrDepths(
const llvm::MachineBasicBlock*)
void computeInstrDepths(
const llvm::MachineBasicBlock*)
Description
Compute instruction depths for all instructions above or in MBB in its trace. This assumes that the trace through MBB has already been computed.
Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:333
Parameters
- const llvm::MachineBasicBlock*
¶void computeInstrHeights(
const llvm::MachineBasicBlock*)
void computeInstrHeights(
const llvm::MachineBasicBlock*)
Description
Compute instruction heights in the trace through MBB. This updates MBB and the blocks below it in the trace. It is assumed that the trace has already been computed.
Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:334
Parameters
- const llvm::MachineBasicBlock*
¶void computeTrace(const llvm::MachineBasicBlock*)
void computeTrace(const llvm::MachineBasicBlock*)
Description
Compute the trace through MBB.
Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:329
Parameters
- const llvm::MachineBasicBlock*
¶const llvm::MachineTraceMetrics::TraceBlockInfo*
getDepthResources(
const llvm::MachineBasicBlock*) const
const llvm::MachineTraceMetrics::TraceBlockInfo*
getDepthResources(
const llvm::MachineBasicBlock*) const
Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:346
Parameters
- const llvm::MachineBasicBlock*
¶const llvm::MachineTraceMetrics::TraceBlockInfo*
getHeightResources(
const llvm::MachineBasicBlock*) const
const llvm::MachineTraceMetrics::TraceBlockInfo*
getHeightResources(
const llvm::MachineBasicBlock*) const
Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:347
Parameters
- const llvm::MachineBasicBlock*
¶const llvm::MachineLoop* getLoopFor(
const llvm::MachineBasicBlock*) const
const llvm::MachineLoop* getLoopFor(
const llvm::MachineBasicBlock*) const
Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:345
Parameters
- const llvm::MachineBasicBlock*
¶virtual const char* getName() const
virtual const char* getName() const
Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:354
¶ArrayRef<unsigned int> getProcResourceDepths(
unsigned int MBBNum) const
ArrayRef<unsigned int> getProcResourceDepths(
unsigned int MBBNum) const
Description
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.
Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:348
Parameters
- unsigned int MBBNum
¶ArrayRef<unsigned int> getProcResourceHeights(
unsigned int MBBNum) const
ArrayRef<unsigned int> getProcResourceHeights(
unsigned int MBBNum) const
Description
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.
Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:349
Parameters
- unsigned int MBBNum
¶llvm::MachineTraceMetrics::Trace getTrace(
const llvm::MachineBasicBlock* MBB)
llvm::MachineTraceMetrics::Trace getTrace(
const llvm::MachineBasicBlock* MBB)
Description
Get the trace that passes through MBB. The trace is computed on demand.
Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:361
Parameters
- const llvm::MachineBasicBlock* MBB
¶void invalidate(
const llvm::MachineBasicBlock* MBB)
void invalidate(
const llvm::MachineBasicBlock* MBB)
Description
Invalidate traces through BadMBB.
Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:356
Parameters
- const llvm::MachineBasicBlock* MBB
¶virtual const llvm::MachineBasicBlock*
pickTracePred(const llvm::MachineBasicBlock*)
virtual const llvm::MachineBasicBlock*
pickTracePred(const llvm::MachineBasicBlock*)
Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:343
Parameters
- const llvm::MachineBasicBlock*
¶virtual const llvm::MachineBasicBlock*
pickTraceSucc(const llvm::MachineBasicBlock*)
virtual const llvm::MachineBasicBlock*
pickTraceSucc(const llvm::MachineBasicBlock*)
Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:344
Parameters
- const llvm::MachineBasicBlock*
¶void print(llvm::raw_ostream&) const
void print(llvm::raw_ostream&) const
Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:355
Parameters
¶void updateDepth(
llvm::MachineTraceMetrics::TraceBlockInfo&
TBI,
const llvm::MachineInstr&,
SparseSet<llvm::LiveRegUnit>& RegUnits)
void updateDepth(
llvm::MachineTraceMetrics::TraceBlockInfo&
TBI,
const llvm::MachineInstr&,
SparseSet<llvm::LiveRegUnit>& RegUnits)
Description
Updates the depth of an machine instruction, given RegUnits.
Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:364
Parameters
- llvm::MachineTraceMetrics::TraceBlockInfo& TBI
- const llvm::MachineInstr&
- SparseSet<llvm::LiveRegUnit>& RegUnits
¶void updateDepth(
const llvm::MachineBasicBlock*,
const llvm::MachineInstr&,
SparseSet<llvm::LiveRegUnit>& RegUnits)
void updateDepth(
const llvm::MachineBasicBlock*,
const llvm::MachineInstr&,
SparseSet<llvm::LiveRegUnit>& RegUnits)
Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:366
Parameters
- const llvm::MachineBasicBlock*
- const llvm::MachineInstr&
- SparseSet<llvm::LiveRegUnit>& RegUnits
¶void updateDepths(
MachineBasicBlock::iterator Start,
MachineBasicBlock::iterator End,
SparseSet<llvm::LiveRegUnit>& RegUnits)
void updateDepths(
MachineBasicBlock::iterator Start,
MachineBasicBlock::iterator End,
SparseSet<llvm::LiveRegUnit>& RegUnits)
Description
Updates the depth of the instructions from Start to End.
Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:370
Parameters
- MachineBasicBlock::iterator Start
- MachineBasicBlock::iterator End
- SparseSet<llvm::LiveRegUnit>& RegUnits
¶void verify() const
void verify() const
Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:357
¶virtual ~Ensemble()
virtual ~Ensemble()
Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:352