class MachineTraceMetrics::Trace

Declaration

class MachineTraceMetrics::Trace { /* full declaration omitted */ };

Description

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.

Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:255

Method Overview

  • public Trace(llvm::MachineTraceMetrics::Ensemble & te, llvm::MachineTraceMetrics::TraceBlockInfo & tbi)
  • public unsigned int getCriticalPath() const
  • public unsigned int getInstrCount() const
  • public llvm::MachineTraceMetrics::InstrCycles getInstrCycles(const llvm::MachineInstr & MI) const
  • public unsigned int getInstrSlack(const llvm::MachineInstr & MI) const
  • public unsigned int getPHIDepth(const llvm::MachineInstr & PHI) const
  • public unsigned int getResourceDepth(bool Bottom) const
  • public unsigned int getResourceLength(ArrayRef<const llvm::MachineBasicBlock *> Extrablocks = None, ArrayRef<const llvm::MCSchedClassDesc *> ExtraInstrs = None, ArrayRef<const llvm::MCSchedClassDesc *> RemoveInstrs = None) const
  • public bool isDepInTrace(const llvm::MachineInstr & DefMI, const llvm::MachineInstr & UseMI) const
  • public void print(llvm::raw_ostream &) const

Methods

Trace(llvm::MachineTraceMetrics::Ensemble& te,
      llvm::MachineTraceMetrics::TraceBlockInfo&
          tbi)

Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:262

Parameters

llvm::MachineTraceMetrics::Ensemble& te
llvm::MachineTraceMetrics::TraceBlockInfo& tbi

unsigned int getCriticalPath() const

Description

Return the length of the (data dependency) critical path through the trace.

Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:293

unsigned int getInstrCount() const

Description

Compute the total number of instructions in the trace.

Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:267

llvm::MachineTraceMetrics::InstrCycles
getInstrCycles(const llvm::MachineInstr& MI) const

Description

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.

Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:298

Parameters

const llvm::MachineInstr& MI

unsigned int getInstrSlack(
    const llvm::MachineInstr& MI) const

Description

Return the slack of MI. This is the number of cycles MI can be delayed before the critical path becomes longer. MI must be an instruction in the trace center block.

Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:305

Parameters

const llvm::MachineInstr& MI

unsigned int getPHIDepth(
    const llvm::MachineInstr& PHI) const

Description

Return the Depth of a PHI instruction in a trace center block successor. The PHI does not have to be part of the trace.

Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:309

Parameters

const llvm::MachineInstr& PHI

unsigned int getResourceDepth(bool Bottom) const

Description

Return the resource depth of the top/bottom of the trace center block. 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.

Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:276

Parameters

bool Bottom

unsigned int getResourceLength(
    ArrayRef<const llvm::MachineBasicBlock*>
        Extrablocks = None,
    ArrayRef<const llvm::MCSchedClassDesc*>
        ExtraInstrs = None,
    ArrayRef<const llvm::MCSchedClassDesc*>
        RemoveInstrs = None) const

Description

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.

Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:286

Parameters

ArrayRef<const llvm::MachineBasicBlock*> Extrablocks = None
ArrayRef<const llvm::MCSchedClassDesc*> ExtraInstrs = None
ArrayRef<const llvm::MCSchedClassDesc*> RemoveInstrs = None

bool isDepInTrace(
    const llvm::MachineInstr& DefMI,
    const llvm::MachineInstr& UseMI) const

Description

A dependence is useful if the basic block of the defining instruction is part of the trace of the user instruction. It is assumed that DefMI dominates UseMI (see also isUsefulDominator).

Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:314

Parameters

const llvm::MachineInstr& DefMI
const llvm::MachineInstr& UseMI

void print(llvm::raw_ostream&) const

Declared at: llvm/include/llvm/CodeGen/MachineTraceMetrics.h:264

Parameters

llvm::raw_ostream&