LLVM  6.0.0svn
Public Member Functions | List of all members
llvm::PPCDispatchGroupSBHazardRecognizer Class Reference

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

#include "Target/PowerPC/PPCHazardRecognizers.h"

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

Public Member Functions

 PPCDispatchGroupSBHazardRecognizer (const InstrItineraryData *ItinData, const ScheduleDAG *DAG_)
 
HazardType getHazardType (SUnit *SU, int Stalls) override
 getHazardType - Return the hazard type of emitting this node. More...
 
bool ShouldPreferAnother (SUnit *SU) override
 ShouldPreferAnother - This callback may be invoked if getHazardType returns NoHazard. More...
 
unsigned PreEmitNoops (SUnit *SU) override
 PreEmitNoops - This callback is invoked prior to emitting an instruction. More...
 
void EmitInstruction (SUnit *SU) override
 EmitInstruction - This callback is invoked when an instruction is emitted, to advance the hazard state. More...
 
void AdvanceCycle () override
 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. More...
 
void RecedeCycle () override
 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. More...
 
void Reset () override
 Reset - This callback is invoked when a new block of instructions is about to be schedule. More...
 
void EmitNoop () override
 EmitNoop - This callback is invoked when a noop was added to the instruction stream. More...
 
- Public Member Functions inherited from llvm::ScoreboardHazardRecognizer
 ScoreboardHazardRecognizer (const InstrItineraryData *ItinData, const ScheduleDAG *DAG, const char *ParentDebugType="")
 
bool atIssueLimit () const override
 atIssueLimit - Return true if no more instructions may be issued in this cycle. More...
 
- Public Member Functions inherited from llvm::ScheduleHazardRecognizer
 ScheduleHazardRecognizer ()=default
 
virtual ~ScheduleHazardRecognizer ()
 
unsigned getMaxLookAhead () const
 
bool isEnabled () const
 
virtual void EmitInstruction (MachineInstr *)
 This overload will be used when the hazard recognizer is being used by a non-scheduling pass, which does not use SUnits. More...
 
virtual unsigned PreEmitNoops (MachineInstr *)
 This overload will be used when the hazard recognizer is being used by a non-scheduling pass, which does not use SUnits. More...
 

Additional Inherited Members

- Public Types inherited from llvm::ScheduleHazardRecognizer
enum  HazardType { NoHazard, Hazard, NoopHazard }
 
- Protected Attributes inherited from llvm::ScheduleHazardRecognizer
unsigned MaxLookAhead = 0
 MaxLookAhead - Indicate the number of cycles in the scoreboard state. More...
 

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

◆ PPCDispatchGroupSBHazardRecognizer()

llvm::PPCDispatchGroupSBHazardRecognizer::PPCDispatchGroupSBHazardRecognizer ( const InstrItineraryData ItinData,
const ScheduleDAG DAG_ 
)
inline

Member Function Documentation

◆ AdvanceCycle()

void PPCDispatchGroupSBHazardRecognizer::AdvanceCycle ( )
overridevirtual

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 208 of file PPCHazardRecognizers.cpp.

References llvm::ScoreboardHazardRecognizer::AdvanceCycle().

Referenced by PPCDispatchGroupSBHazardRecognizer().

◆ EmitInstruction()

void PPCDispatchGroupSBHazardRecognizer::EmitInstruction ( SUnit )
overridevirtual

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

Reimplemented from llvm::ScoreboardHazardRecognizer.

Definition at line 176 of file PPCHazardRecognizers.cpp.

References llvm::dbgs(), DEBUG, llvm::ScoreboardHazardRecognizer::EmitInstruction(), llvm::MCInstrDesc::isBranch(), and llvm::SUnit::NodeNum.

Referenced by PPCDispatchGroupSBHazardRecognizer().

◆ EmitNoop()

void PPCDispatchGroupSBHazardRecognizer::EmitNoop ( )
overridevirtual

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

Reimplemented from llvm::ScheduleHazardRecognizer.

Definition at line 222 of file PPCHazardRecognizers.cpp.

References llvm::PPC::DIR_PWR6, llvm::PPC::DIR_PWR7, llvm::PPC::DIR_PWR8, and llvm::PPC::DIR_PWR9.

Referenced by PPCDispatchGroupSBHazardRecognizer().

◆ getHazardType()

ScheduleHazardRecognizer::HazardType PPCDispatchGroupSBHazardRecognizer::getHazardType ( SUnit m,
int  Stalls 
)
overridevirtual

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::ScoreboardHazardRecognizer::getHazardType(), and llvm::ScheduleHazardRecognizer::NoopHazard.

Referenced by PPCDispatchGroupSBHazardRecognizer().

◆ PreEmitNoops()

unsigned PPCDispatchGroupSBHazardRecognizer::PreEmitNoops ( SUnit )
overridevirtual

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::PPC::DIR_PWR9, and llvm::ScheduleHazardRecognizer::PreEmitNoops().

Referenced by PPCDispatchGroupSBHazardRecognizer().

◆ RecedeCycle()

void PPCDispatchGroupSBHazardRecognizer::RecedeCycle ( )
overridevirtual

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 212 of file PPCHazardRecognizers.cpp.

References llvm_unreachable.

Referenced by PPCDispatchGroupSBHazardRecognizer().

◆ Reset()

void PPCDispatchGroupSBHazardRecognizer::Reset ( )
overridevirtual

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 216 of file PPCHazardRecognizers.cpp.

References llvm::ScoreboardHazardRecognizer::Reset().

Referenced by PPCDispatchGroupSBHazardRecognizer().

◆ ShouldPreferAnother()

bool PPCDispatchGroupSBHazardRecognizer::ShouldPreferAnother ( SUnit )
overridevirtual

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::ScheduleHazardRecognizer::ShouldPreferAnother().

Referenced by PPCDispatchGroupSBHazardRecognizer().


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