Hazard recognizer that tracks function‐unit usage with a scoreboard.

Synopsis

Declared in <llvm/CodeGen/ScoreboardHazardRecognizer.h>

class ScoreboardHazardRecognizer
    : public ScheduleHazardRecognizer

Description

Encapsulates hazard‐avoidance heuristics for scheduling based on the target's instruction itineraries, maintaining reserved and required scoreboards of function‐unit masks across cycles.

Base Classes

Name

Description

ScheduleHazardRecognizer

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.

Enums

Name

Description

HazardType

Classification of whether an instruction can issue in the current cycle.

Member Functions

Name

Description

ScoreboardHazardRecognizer [constructor]

Construct a scoreboard hazard recognizer for the given itinerary and DAG.

AdvanceCycle [virtual]

Advance the scoreboard to the next cycle for top‐down scheduling.

EmitInstruction

EmitInstruction overloads

EmitNoop [virtual]

EmitNoop ‐ This callback is invoked when a noop was added to the instruction stream.

EmitNoops [virtual]

EmitNoops ‐ This callback is invoked when noops were added to the instruction stream.

PreEmitNoops

PreEmitNoops overloads

RecedeCycle [virtual]

Recede the scoreboard to the previous cycle for bottom‐up scheduling.

Reset [virtual]

Reset the scoreboards and issue state for a new block of instructions.

ShouldPreferAnother [virtual]

Return true if another available instruction should be preferred.

atIssueLimit [virtual]

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

getHazardType

getHazardType overloads

getMaxLookAhead

Return the number of cycles in the scoreboard look‐ahead.

isEnabled

Return true if this recognizer is active (MaxLookAhead is non‐zero).

Protected Data Members

Name

Description

MaxLookAhead

Number of cycles tracked in the scoreboard state.

Created with MrDocs