LLVM: llvm::MachineTraceMetrics::Trace Class Reference (original) (raw)

A trace represents a plausible sequence of executed basic blocks that passes through the current basic block one. More...

#include "[llvm/CodeGen/MachineTraceMetrics.h](MachineTraceMetrics%5F8h%5Fsource.html)"

Public Member Functions
Trace (Ensemble &te, TraceBlockInfo &tbi)
void print (raw_ostream &) const
void dump () const
unsigned getInstrCount () const
Compute the total number of instructions in the trace.
unsigned getResourceDepth (bool Bottom) const
Return the resource depth of the top/bottom of the trace center block.
unsigned getResourceLength (ArrayRef< const MachineBasicBlock * > Extrablocks={}, ArrayRef< const MCSchedClassDesc * > ExtraInstrs={}, ArrayRef< const MCSchedClassDesc * > RemoveInstrs={}) const
Return the resource length of the trace.
unsigned getCriticalPath () const
Return the length of the (data dependency) critical path through the trace.
InstrCycles getInstrCycles (const MachineInstr &MI) const
Return the depth and height of MI.
unsigned getInstrSlack (const MachineInstr &MI) const
Return the slack of MI.
unsigned getPHIDepth (const MachineInstr &PHI) const
Return the Depth of a PHI instruction in a trace center block successor.
bool isDepInTrace (const MachineInstr &DefMI, const MachineInstr &UseMI) const
A dependence is useful if the basic block of the defining instruction is part of the trace of the user instruction.

A trace represents a plausible sequence of executed basic blocks that passes through the current basic block one.

The Trace class serves as a handle to internal cached data structures.

Definition at line 275 of file MachineTraceMetrics.h.

dump()

void llvm::MachineTraceMetrics::Trace::dump ( ) const inline

getCriticalPath()

unsigned llvm::MachineTraceMetrics::Trace::getCriticalPath ( ) const inline

getInstrCount()

unsigned llvm::MachineTraceMetrics::Trace::getInstrCount ( ) const inline

getInstrCycles()

Return the depth and height of MI.

The depth is only valid for instructions in or above the trace center block. The height is only valid for instructions in or below the trace center block.

Definition at line 319 of file MachineTraceMetrics.h.

References MI.

Referenced by getInstrSlack(), and getPHIDepth().

getInstrSlack()

getPHIDepth()

getResourceDepth()

unsigned MachineTraceMetrics::Trace::getResourceDepth ( bool Bottom ) const

Return the resource depth of the top/bottom of the trace center block.

When bottom is set include instructions in current block in estimate.

This is the number of cycles required to execute all instructions from the trace head to the trace center block. The resource depth only considers execution resources, it ignores data dependencies. When Bottom is set, instructions in the trace center block are included.

All instructions before current block

Definition at line 1225 of file MachineTraceMetrics.cpp.

References llvm::ArrayRef< T >::size().

getResourceLength()

Return the resource length of the trace.

This is the number of cycles required to execute the instructions in the trace if they were all independent, exposing the maximum instruction-level parallelism.

Any blocks in Extrablocks are included as if they were part of the trace. Likewise, extra resources required by the specified scheduling classes are included. For the caller to account for extra machine instructions, it must first resolve each instruction's scheduling class.

Definition at line 1252 of file MachineTraceMetrics.cpp.

References MBB, and llvm::ArrayRef< T >::size().

isDepInTrace()

print()

void MachineTraceMetrics::Trace::print ( raw_ostream & OS ) const

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