LLVM  5.0.0
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:
[legend]

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

 Ensemble (MachineTraceMetrics *)
 
virtual const MachineBasicBlock * pickTracePred (const MachineBasicBlock *)=0
 
virtual const MachineBasicBlock * pickTraceSucc (const MachineBasicBlock *)=0
 
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
 

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

Constructor & Destructor Documentation

MachineTraceMetrics::Ensemble::Ensemble ( MachineTraceMetrics *  ct)
explicitprotected
MachineTraceMetrics::Ensemble::~Ensemble ( )
virtualdefault

Member Function Documentation

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

Definition at line 168 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 265 of file MachineTraceMetrics.cpp.

References assert(), and 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 278 of file MachineTraceMetrics.cpp.

References assert(), and llvm::makeArrayRef().

MachineTraceMetrics::Trace MachineTraceMetrics::Ensemble::getTrace ( const MachineBasicBlock *  MBB)
void MachineTraceMetrics::Ensemble::invalidate ( const MachineBasicBlock *  MBB)
virtual const MachineBasicBlock* llvm::MachineTraceMetrics::Ensemble::pickTracePred ( const MachineBasicBlock *  )
protectedpure virtual
virtual const MachineBasicBlock* llvm::MachineTraceMetrics::Ensemble::pickTraceSucc ( const MachineBasicBlock *  )
protectedpure virtual
void MachineTraceMetrics::Ensemble::print ( raw_ostream &  OS) const

Definition at line 1288 of file MachineTraceMetrics.cpp.

References getName().

Referenced by llvm::operator<<().

void MachineTraceMetrics::Ensemble::verify ( ) const

Friends And Related Function Documentation

friend class Trace
friend

Definition at line 306 of file MachineTraceMetrics.h.

Member Data Documentation

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

Definition at line 323 of file MachineTraceMetrics.h.

Referenced by Ensemble().


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