LLVM API Documentation

Public Member Functions
llvm::PPCDispatchGroupSBHazardRecognizer Class Reference

#include <PPCHazardRecognizers.h>

Inheritance diagram for llvm::PPCDispatchGroupSBHazardRecognizer:
Inheritance graph
[legend]
Collaboration diagram for llvm::PPCDispatchGroupSBHazardRecognizer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 PPCDispatchGroupSBHazardRecognizer (const InstrItineraryData *ItinData, const ScheduleDAG *DAG_)
HazardType getHazardType (SUnit *SU, int Stalls) override
bool ShouldPreferAnother (SUnit *SU) override
unsigned PreEmitNoops (SUnit *SU) override
void EmitInstruction (SUnit *SU) override
void AdvanceCycle () override
void RecedeCycle () override
void Reset () override
void EmitNoop () override

Detailed Description

PPCDispatchGroupSBHazardRecognizer - This class implements a scoreboard-based hazard recognizer for PPC ooo processors with dispatch-group hazards.

Definition at line 26 of file PPCHazardRecognizers.h.


Constructor & Destructor Documentation

Definition at line 35 of file PPCHazardRecognizers.h.


Member Function Documentation

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.

Reimplemented from llvm::ScoreboardHazardRecognizer.

Definition at line 207 of file PPCHazardRecognizers.cpp.

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

Reimplemented from llvm::ScoreboardHazardRecognizer.

Definition at line 175 of file PPCHazardRecognizers.cpp.

References llvm::SmallVectorImpl< T >::clear(), llvm::dbgs(), DEBUG, llvm::ScheduleDAG::dumpNode(), llvm::ScheduleDAG::getInstrDesc(), llvm::MCInstrDesc::isBranch(), llvm::SUnit::NodeNum, and llvm::SmallVectorTemplateBase< T, isPodLike >::push_back().

void PPCDispatchGroupSBHazardRecognizer::EmitNoop ( ) [override, virtual]

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.

Reimplemented from llvm::ScoreboardHazardRecognizer.

Definition at line 141 of file PPCHazardRecognizers.cpp.

References llvm::ScheduleHazardRecognizer::NoopHazard.

PreEmitNoops - This callback is invoked prior to emitting an instruction. It should return the number of noops to emit prior to the provided instruction. Note: This is only used during PostRA scheduling. EmitNoop is not called for these noops.

Reimplemented from llvm::ScheduleHazardRecognizer.

Definition at line 157 of file PPCHazardRecognizers.cpp.

References llvm::PPC::DIR_PWR6, llvm::PPC::DIR_PWR7, llvm::PPC::DIR_PWR8, llvm::TargetMachine::getSubtarget(), and llvm::ScheduleDAG::TM.

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.

Reimplemented from llvm::ScoreboardHazardRecognizer.

Definition at line 211 of file PPCHazardRecognizers.cpp.

References llvm_unreachable.

void PPCDispatchGroupSBHazardRecognizer::Reset ( ) [override, virtual]

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.

Reimplemented from llvm::ScoreboardHazardRecognizer.

Definition at line 215 of file PPCHazardRecognizers.cpp.

References llvm::SmallVectorImpl< T >::clear().

ShouldPreferAnother - This callback may be invoked if getHazardType returns NoHazard. If, even though there is no hazard, it would be better to schedule another available instruction, this callback should return true.

Reimplemented from llvm::ScheduleHazardRecognizer.

Definition at line 148 of file PPCHazardRecognizers.cpp.

References llvm::ScheduleDAG::getInstrDesc().


The documentation for this class was generated from the following files: