class Pipeline

Declaration

class Pipeline { /* full declaration omitted */ };

Description

A pipeline for a specific subtarget. It emulates an out-of-order execution of instructions. Instructions are fetched from a MCInst sequence managed by an initial 'Fetch' stage. Instructions are firstly fetched, then dispatched to the schedulers, and then executed. This class tracks the lifetime of an instruction from the moment where it gets dispatched to the schedulers, to the moment where it finishes executing and register writes are architecturally committed. In particular, it monitors changes in the state of every instruction in flight. Instructions are executed in a loop of iterations. The number of iterations is defined by the SourceMgr object, which is managed by the initial stage of the instruction pipeline. The Pipeline entry point is method 'run()' which executes cycles in a loop until there are new instructions to dispatch, and not every instruction has been retired. Internally, the Pipeline collects statistical information in the form of histograms. For example, it tracks how the dispatch group size changes over time.

Declared at: llvm/include/llvm/MCA/Pipeline.h:50

Member Variables

private llvm::mca::Pipeline::State CurrentState
private SmallVector<std::unique_ptr<Stage>, 8> Stages
An ordered list of stages that define this instruction pipeline.
private std::set<HWEventListener*> Listeners
private unsigned int Cycles

Method Overview

Methods

Pipeline(const llvm::mca::Pipeline& P)

Declared at: llvm/include/llvm/MCA/Pipeline.h:51

Parameters

const llvm::mca::Pipeline& P

Pipeline()

Declared at: llvm/include/llvm/MCA/Pipeline.h:72

void addEventListener(
    llvm::mca::HWEventListener* Listener)

Declared at: llvm/include/llvm/MCA/Pipeline.h:78

Parameters

llvm::mca::HWEventListener* Listener

void appendStage(std::unique_ptr<Stage> S)

Declared at: llvm/include/llvm/MCA/Pipeline.h:73

Parameters

std::unique_ptr<Stage> S

bool hasWorkToProcess()

Declared at: llvm/include/llvm/MCA/Pipeline.h:67

bool isPaused() const

Description

Returns whether the pipeline is currently paused.

Declared at: llvm/include/llvm/MCA/Pipeline.h:81

void notifyCycleBegin()

Declared at: llvm/include/llvm/MCA/Pipeline.h:68

void notifyCycleEnd()

Declared at: llvm/include/llvm/MCA/Pipeline.h:69

Expected<unsigned int> run()

Description

Returns the total number of simulated cycles.

Declared at: llvm/include/llvm/MCA/Pipeline.h:76

llvm::Error runCycle()

Declared at: llvm/include/llvm/MCA/Pipeline.h:66