LLVM 19.0.0git
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"

Public Member Functions

virtual ~Ensemble ()
 
virtual const chargetName () const =0
 
void print (raw_ostream &) const
 
void invalidate (const MachineBasicBlock *MBB)
 Invalidate traces through BadMBB.
 
void verify () const
 
Trace getTrace (const MachineBasicBlock *MBB)
 Get the trace that passes through MBB.
 
void updateDepth (TraceBlockInfo &TBI, const MachineInstr &, SparseSet< LiveRegUnit > &RegUnits)
 Updates the depth of an machine instruction, given RegUnits.
 
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.
 

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.
 
ArrayRef< unsignedgetProcResourceHeights (unsigned MBBNum) const
 Get an array of processor resource heights for MBB.
 

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 330 of file MachineTraceMetrics.h.

Constructor & Destructor Documentation

◆ Ensemble()

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

◆ ~Ensemble()

MachineTraceMetrics::Ensemble::~Ensemble ( )
virtualdefault

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

Definition at line 168 of file MachineTraceMetrics.cpp.

References MBB.

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

References assert().

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

References assert().

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

References getName(), and OS.

Referenced by llvm::operator<<().

◆ updateDepth() [1/2]

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

Definition at line 833 of file MachineTraceMetrics.cpp.

References llvm::MachineBasicBlock::getNumber(), MBB, and UseMI.

◆ updateDepth() [2/2]

void MachineTraceMetrics::Ensemble::updateDepth ( MachineTraceMetrics::TraceBlockInfo TBI,
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 839 of file MachineTraceMetrics.cpp.

References End.

◆ verify()

void MachineTraceMetrics::Ensemble::verify ( ) const

Friends And Related Function Documentation

◆ Trace

friend class Trace
friend

Definition at line 331 of file MachineTraceMetrics.h.

Member Data Documentation

◆ MTM

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

Definition at line 348 of file MachineTraceMetrics.h.

Referenced by Ensemble().


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