LLVM  8.0.1
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
llvm::MachineTraceMetrics::Ensemble Class Referenceabstract

A trace ensemble is a collection of traces selected using the same strategy, for example 'minimum resource height'. More...

#include "llvm/CodeGen/MachineTraceMetrics.h"

Collaboration diagram for llvm::MachineTraceMetrics::Ensemble:
Collaboration graph
[legend]

Public Member Functions

virtual ~Ensemble ()
 
virtual const chargetName () 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...
 
void updateDepth (TraceBlockInfo &TBI, const MachineInstr &, SparseSet< LiveRegUnit > &RegUnits)
 Updates the depth of an machine instruction, given RegUnits. More...
 
void updateDepth (const MachineBasicBlock *, const MachineInstr &, SparseSet< LiveRegUnit > &RegUnits)
 
void updateDepths (MachineBasicBlock::iterator Start, MachineBasicBlock::iterator End, SparseSet< LiveRegUnit > &RegUnits)
 Updates the depth of the instructions from Start to End. More...
 

Protected Member Functions

 Ensemble (MachineTraceMetrics *)
 
virtual const MachineBasicBlockpickTracePred (const MachineBasicBlock *)=0
 
virtual const MachineBasicBlockpickTraceSucc (const MachineBasicBlock *)=0
 
const MachineLoopgetLoopFor (const MachineBasicBlock *) const
 
const TraceBlockInfogetDepthResources (const MachineBasicBlock *) const
 
const TraceBlockInfogetHeightResources (const MachineBasicBlock *) const
 
ArrayRef< unsignedgetProcResourceDepths (unsigned MBBNum) const
 Get an array of processor resource depths for MBB. More...
 
ArrayRef< unsignedgetProcResourceHeights (unsigned MBBNum) const
 Get an array of processor resource heights for MBB. More...
 

Protected Attributes

MachineTraceMetricsMTM
 

Friends

class Trace
 

Detailed 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.

Definition at line 322 of file MachineTraceMetrics.h.

Constructor & Destructor Documentation

◆ Ensemble()

MachineTraceMetrics::Ensemble::Ensemble ( MachineTraceMetrics ct)
explicitprotected

◆ ~Ensemble()

MachineTraceMetrics::Ensemble::~Ensemble ( )
virtualdefault

Referenced by Ensemble().

Member Function Documentation

◆ getDepthResources()

const MachineTraceMetrics::TraceBlockInfo * MachineTraceMetrics::Ensemble::getDepthResources ( const MachineBasicBlock MBB) const
protected

◆ getHeightResources()

const MachineTraceMetrics::TraceBlockInfo * MachineTraceMetrics::Ensemble::getHeightResources ( const MachineBasicBlock MBB) const
protected

◆ getLoopFor()

const MachineLoop * MachineTraceMetrics::Ensemble::getLoopFor ( const MachineBasicBlock MBB) const
protected

◆ getName()

virtual const char* llvm::MachineTraceMetrics::Ensemble::getName ( ) const
pure virtual

◆ getProcResourceDepths()

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 265 of file MachineTraceMetrics.cpp.

References assert(), llvm::SmallVectorTemplateCommon< T, typename >::data(), llvm::TargetSchedModel::getNumProcResourceKinds(), getProcResourceHeights(), llvm::makeArrayRef(), MTM, and llvm::SmallVectorBase::size().

Referenced by getHeightResources(), and getLoopFor().

◆ getProcResourceHeights()

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 278 of file MachineTraceMetrics.cpp.

References assert(), llvm::SmallVectorTemplateCommon< T, typename >::data(), llvm::TargetSchedModel::getNumProcResourceKinds(), llvm::makeArrayRef(), MTM, and llvm::SmallVectorBase::size().

Referenced by getLoopFor(), getProcResourceDepths(), and pushDepHeight().

◆ getTrace()

MachineTraceMetrics::Trace MachineTraceMetrics::Ensemble::getTrace ( const MachineBasicBlock MBB)

◆ invalidate()

void MachineTraceMetrics::Ensemble::invalidate ( const MachineBasicBlock MBB)

◆ pickTracePred()

virtual const MachineBasicBlock* llvm::MachineTraceMetrics::Ensemble::pickTracePred ( const MachineBasicBlock )
protectedpure virtual

◆ pickTraceSucc()

virtual const MachineBasicBlock* llvm::MachineTraceMetrics::Ensemble::pickTraceSucc ( const MachineBasicBlock )
protectedpure virtual

◆ print()

void MachineTraceMetrics::Ensemble::print ( raw_ostream OS) const

Definition at line 1289 of file MachineTraceMetrics.cpp.

References getName().

Referenced by llvm::operator<<().

◆ updateDepth() [1/2]

void MachineTraceMetrics::Ensemble::updateDepth ( MachineTraceMetrics::TraceBlockInfo TBI,
const MachineInstr UseMI,
SparseSet< LiveRegUnit > &  RegUnits 
)

◆ updateDepth() [2/2]

void MachineTraceMetrics::Ensemble::updateDepth ( const MachineBasicBlock MBB,
const MachineInstr UseMI,
SparseSet< LiveRegUnit > &  RegUnits 
)

◆ updateDepths()

void MachineTraceMetrics::Ensemble::updateDepths ( MachineBasicBlock::iterator  Start,
MachineBasicBlock::iterator  End,
SparseSet< LiveRegUnit > &  RegUnits 
)

Updates the depth of the instructions from Start to End.

Definition at line 828 of file MachineTraceMetrics.cpp.

Referenced by updateDepth().

◆ verify()

void MachineTraceMetrics::Ensemble::verify ( ) const

Friends And Related Function Documentation

◆ Trace

friend class Trace
friend

Definition at line 323 of file MachineTraceMetrics.h.

Referenced by getTrace().

Member Data Documentation

◆ MTM

MachineTraceMetrics& llvm::MachineTraceMetrics::Ensemble::MTM
protected

The documentation for this class was generated from the following files: