class ScoreboardHazardRecognizer

Declaration

class ScoreboardHazardRecognizer : public ScheduleHazardRecognizer { /* full declaration omitted */ };

Description

HazardRecognizer - This determines whether or not an instruction can be issued this cycle, and whether or not a noop needs to be inserted to handle the hazard.

Declared at: llvm/include/llvm/CodeGen/ScoreboardHazardRecognizer.h:29

Inherits from: ScheduleHazardRecognizer

Member Variables

private const char* DebugType
private const llvm::InstrItineraryData* ItinData
private const llvm::ScheduleDAG* DAG
private unsigned int IssueWidth = 0
IssueWidth - Max issue per cycle. 0=Unknown.
private unsigned int IssueCount = 0
IssueCount - Count instructions issued in this cycle.
private llvm::ScoreboardHazardRecognizer::Scoreboard ReservedScoreboard
private llvm::ScoreboardHazardRecognizer::Scoreboard RequiredScoreboard

Inherited from ScheduleHazardRecognizer:

protected MaxLookAhead = 0

Method Overview

Inherited from ScheduleHazardRecognizer:

Methods

void AdvanceCycle()

Description

AdvanceCycle - This callback is invoked whenever the next top-down instruction to be scheduled cannot issue in the current cycle, either because of latency or resource conflicts. This should increment the internal state of the hazard recognizer so that previously "Hazard" instructions will now not be hazards.

Declared at: llvm/include/llvm/CodeGen/ScoreboardHazardRecognizer.h:121

void EmitInstruction(llvm::SUnit* SU)

Description

EmitInstruction - This callback is invoked when an instruction is emitted, to advance the hazard state.

Declared at: llvm/include/llvm/CodeGen/ScoreboardHazardRecognizer.h:120

Parameters

llvm::SUnit* SU

void RecedeCycle()

Description

RecedeCycle - This callback is invoked whenever the next bottom-up instruction to be scheduled cannot issue in the current cycle, either because of latency or resource conflicts.

Declared at: llvm/include/llvm/CodeGen/ScoreboardHazardRecognizer.h:122

void Reset()

Description

Reset - This callback is invoked when a new block of instructions is about to be schedule. The hazard state should be set to an initialized state.

Declared at: llvm/include/llvm/CodeGen/ScoreboardHazardRecognizer.h:119

ScoreboardHazardRecognizer(
    const llvm::InstrItineraryData* II,
    const llvm::ScheduleDAG* DAG,
    const char* ParentDebugType = "")

Declared at: llvm/include/llvm/CodeGen/ScoreboardHazardRecognizer.h:108

Parameters

const llvm::InstrItineraryData* II
const llvm::ScheduleDAG* DAG
const char* ParentDebugType = ""

bool atIssueLimit() const

Description

atIssueLimit - Return true if no more instructions may be issued in this cycle.

Declared at: llvm/include/llvm/CodeGen/ScoreboardHazardRecognizer.h:114

llvm::ScheduleHazardRecognizer::HazardType
getHazardType(llvm::SUnit* SU, int Stalls)

Description

getHazardType - Return the hazard type of emitting this node. There are three possible results. Either: * NoHazard: it is legal to issue this instruction on this cycle. * Hazard: issuing this instruction would stall the machine. If some other instruction is available, issue it first. * NoopHazard: issuing this instruction would break the program. If some other instruction can be issued, do so, otherwise issue a noop.

Declared at: llvm/include/llvm/CodeGen/ScoreboardHazardRecognizer.h:118

Parameters

llvm::SUnit* SU
int Stalls