LLVM
8.0.1
|
Per-basic block information that relates to a specific trace through the block. More...
#include "llvm/CodeGen/MachineTraceMetrics.h"
Public Member Functions | |
TraceBlockInfo ()=default | |
bool | hasValidDepth () const |
Returns true if the depth resources have been computed from the trace above this block. More... | |
bool | hasValidHeight () const |
Returns true if the height resources have been computed from the trace below this block. More... | |
void | invalidateDepth () |
Invalidate depth resources when some block above this one has changed. More... | |
void | invalidateHeight () |
Invalidate height resources when a block below this one has changed. More... | |
bool | isUsefulDominator (const TraceBlockInfo &TBI) const |
Assuming that this is a dominator of TBI, determine if it contains useful instruction depths. More... | |
void | print (raw_ostream &) const |
Public Attributes | |
const MachineBasicBlock * | Pred = nullptr |
Trace predecessor, or NULL for the first block in the trace. More... | |
const MachineBasicBlock * | Succ = nullptr |
Trace successor, or NULL for the last block in the trace. More... | |
unsigned | Head |
The block number of the head of the trace. (When hasValidDepth()). More... | |
unsigned | Tail |
The block number of the tail of the trace. (When hasValidHeight()). More... | |
unsigned | InstrDepth = ~0u |
Accumulated number of instructions in the trace above this block. More... | |
unsigned | InstrHeight = ~0u |
Accumulated number of instructions in the trace below this block. More... | |
bool | HasValidInstrDepths = false |
Instruction depths have been computed. This implies hasValidDepth(). More... | |
bool | HasValidInstrHeights = false |
Instruction heights have been computed. This implies hasValidHeight(). More... | |
unsigned | CriticalPath |
Critical path length. More... | |
SmallVector< LiveInReg, 4 > | LiveIns |
Live-in registers. More... | |
Per-basic block information that relates to a specific trace through the block.
Convergent traces means that only one of these is required per block in a trace ensemble.
Definition at line 156 of file MachineTraceMetrics.h.
|
default |
|
inline |
Returns true if the depth resources have been computed from the trace above this block.
Definition at line 183 of file MachineTraceMetrics.h.
Referenced by llvm::MachineTraceMetrics::Ensemble::getDepthResources(), llvm::MachineTraceMetrics::Ensemble::getLoopFor(), llvm::MachineTraceMetrics::Ensemble::getTrace(), llvm::po_iterator_storage< LoopBounds, true >::insertEdge(), llvm::MachineTraceMetrics::Ensemble::invalidate(), isUsefulDominator(), llvm::MachineTraceMetrics::Trace::print(), and llvm::MachineTraceMetrics::Ensemble::verify().
|
inline |
Returns true if the height resources have been computed from the trace below this block.
Definition at line 187 of file MachineTraceMetrics.h.
Referenced by llvm::MachineTraceMetrics::Ensemble::getHeightResources(), llvm::MachineTraceMetrics::Ensemble::getLoopFor(), llvm::MachineTraceMetrics::Ensemble::getTrace(), llvm::po_iterator_storage< LoopBounds, true >::insertEdge(), llvm::MachineTraceMetrics::Ensemble::invalidate(), llvm::MachineTraceMetrics::Trace::print(), and llvm::MachineTraceMetrics::Ensemble::verify().
|
inline |
Invalidate depth resources when some block above this one has changed.
Definition at line 190 of file MachineTraceMetrics.h.
Referenced by llvm::MachineTraceMetrics::Ensemble::invalidate().
|
inline |
Invalidate height resources when a block below this one has changed.
Definition at line 193 of file MachineTraceMetrics.h.
Referenced by llvm::MachineTraceMetrics::Ensemble::invalidate().
|
inline |
Assuming that this is a dominator of TBI, determine if it contains useful instruction depths.
A dominating block can be above the current trace head, and any dependencies from such a far away dominator are not expected to affect the critical path.
Also returns true when TBI == this.
Definition at line 201 of file MachineTraceMetrics.h.
References hasValidDepth(), Head, and InstrDepth.
Referenced by llvm::MachineTraceMetrics::Trace::isDepInTrace(), and llvm::MachineTraceMetrics::Ensemble::updateDepth().
void MachineTraceMetrics::TraceBlockInfo::print | ( | raw_ostream & | OS | ) | const |
Definition at line 1298 of file MachineTraceMetrics.cpp.
References llvm::printMBBReference().
unsigned llvm::MachineTraceMetrics::TraceBlockInfo::CriticalPath |
Critical path length.
This is the number of cycles in the longest data dependency chain through the trace. This is only valid when both HasValidInstrDepths and HasValidInstrHeights are set.
Definition at line 229 of file MachineTraceMetrics.h.
Referenced by llvm::MachineTraceMetrics::Trace::getCriticalPath(), and llvm::MachineTraceMetrics::Ensemble::updateDepth().
Instruction depths have been computed. This implies hasValidDepth().
Definition at line 221 of file MachineTraceMetrics.h.
Referenced by llvm::MachineTraceMetrics::Ensemble::getTrace(), and llvm::MachineTraceMetrics::Ensemble::updateDepth().
Instruction heights have been computed. This implies hasValidHeight().
Definition at line 224 of file MachineTraceMetrics.h.
Referenced by llvm::MachineTraceMetrics::Ensemble::getTrace(), and llvm::MachineTraceMetrics::Ensemble::updateDepth().
unsigned llvm::MachineTraceMetrics::TraceBlockInfo::Head |
The block number of the head of the trace. (When hasValidDepth()).
Definition at line 166 of file MachineTraceMetrics.h.
Referenced by llvm::MachineTraceMetrics::Ensemble::getLoopFor(), and isUsefulDominator().
unsigned llvm::MachineTraceMetrics::TraceBlockInfo::InstrDepth = ~0u |
Accumulated number of instructions in the trace above this block.
Does not include instructions in this block.
Definition at line 173 of file MachineTraceMetrics.h.
Referenced by llvm::MachineTraceMetrics::Trace::getInstrCount(), llvm::MachineTraceMetrics::Ensemble::getLoopFor(), isExitingLoop(), and isUsefulDominator().
unsigned llvm::MachineTraceMetrics::TraceBlockInfo::InstrHeight = ~0u |
Accumulated number of instructions in the trace below this block.
Includes instructions in this block.
Definition at line 177 of file MachineTraceMetrics.h.
Referenced by llvm::MachineTraceMetrics::Trace::getInstrCount(), llvm::MachineTraceMetrics::Ensemble::getLoopFor(), and isExitingLoop().
SmallVector<LiveInReg, 4> llvm::MachineTraceMetrics::TraceBlockInfo::LiveIns |
Live-in registers.
These registers are defined above the current block and used by this block or a block below it. This does not include PHI uses in the current block, but it does include PHI uses in deeper blocks.
Definition at line 235 of file MachineTraceMetrics.h.
const MachineBasicBlock* llvm::MachineTraceMetrics::TraceBlockInfo::Pred = nullptr |
Trace predecessor, or NULL for the first block in the trace.
Valid when hasValidDepth().
Definition at line 159 of file MachineTraceMetrics.h.
Referenced by llvm::MachineTraceMetrics::Ensemble::getLoopFor(), llvm::MachineTraceMetrics::Ensemble::invalidate(), llvm::MachineTraceMetrics::Trace::print(), llvm::MachineTraceMetrics::Ensemble::updateDepth(), and llvm::MachineTraceMetrics::Ensemble::verify().
const MachineBasicBlock* llvm::MachineTraceMetrics::TraceBlockInfo::Succ = nullptr |
Trace successor, or NULL for the last block in the trace.
Valid when hasValidHeight().
Definition at line 163 of file MachineTraceMetrics.h.
Referenced by llvm::MachineTraceMetrics::Ensemble::getLoopFor(), llvm::MachineTraceMetrics::Ensemble::invalidate(), llvm::MachineTraceMetrics::Trace::print(), and llvm::MachineTraceMetrics::Ensemble::verify().
unsigned llvm::MachineTraceMetrics::TraceBlockInfo::Tail |
The block number of the tail of the trace. (When hasValidHeight()).
Definition at line 169 of file MachineTraceMetrics.h.
Referenced by llvm::MachineTraceMetrics::Ensemble::getLoopFor().