LLVM API Documentation
#include <ScheduleHazardRecognizer.h>
Public Types | |
enum | HazardType { NoHazard, Hazard, NoopHazard } |
Public Member Functions | |
ScheduleHazardRecognizer () | |
virtual | ~ScheduleHazardRecognizer () |
unsigned | getMaxLookAhead () const |
bool | isEnabled () const |
virtual bool | atIssueLimit () const |
virtual HazardType | getHazardType (SUnit *m, int Stalls=0) |
virtual void | Reset () |
virtual void | EmitInstruction (SUnit *) |
virtual void | AdvanceCycle () |
virtual void | RecedeCycle () |
virtual void | EmitNoop () |
Protected Attributes | |
unsigned | MaxLookAhead |
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.
Definition at line 25 of file ScheduleHazardRecognizer.h.
Enumerator | |
---|---|
NoHazard | |
Hazard | |
NoopHazard |
Definition at line 37 of file ScheduleHazardRecognizer.h.
|
inline |
Definition at line 34 of file ScheduleHazardRecognizer.h.
|
virtual |
Definition at line 642 of file ScheduleDAG.cpp.
|
inlinevirtual |
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 in llvm::ScoreboardHazardRecognizer, llvm::PPCHazardRecognizer970, llvm::ARMHazardRecognizer, and llvm::PPCScoreboardHazardRecognizer.
Definition at line 78 of file ScheduleHazardRecognizer.h.
Referenced by EmitNoop().
|
inlinevirtual |
atIssueLimit - Return true if no more instructions may be issued in this cycle.
FIXME: remove this once MachineScheduler is the only client.
Reimplemented in llvm::ScoreboardHazardRecognizer.
Definition at line 51 of file ScheduleHazardRecognizer.h.
|
inlinevirtual |
EmitInstruction - This callback is invoked when an instruction is emitted, to advance the hazard state.
Reimplemented in llvm::ScoreboardHazardRecognizer, llvm::PPCHazardRecognizer970, llvm::ARMHazardRecognizer, and llvm::PPCScoreboardHazardRecognizer.
Definition at line 71 of file ScheduleHazardRecognizer.h.
|
inlinevirtual |
EmitNoop - This callback is invoked when a noop was added to the instruction stream.
Definition at line 87 of file ScheduleHazardRecognizer.h.
References AdvanceCycle().
|
inlinevirtual |
getHazardType - Return the hazard type of emitting this node. There are three possible results. Either:
Reimplemented in llvm::ScoreboardHazardRecognizer, llvm::PPCHazardRecognizer970, llvm::ARMHazardRecognizer, and llvm::PPCScoreboardHazardRecognizer.
Definition at line 60 of file ScheduleHazardRecognizer.h.
References NoHazard.
|
inline |
Definition at line 43 of file ScheduleHazardRecognizer.h.
References MaxLookAhead.
|
inline |
Definition at line 45 of file ScheduleHazardRecognizer.h.
References MaxLookAhead.
Referenced by llvm::ScoreboardHazardRecognizer::ScoreboardHazardRecognizer().
|
inlinevirtual |
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 in llvm::ScoreboardHazardRecognizer, and llvm::ARMHazardRecognizer.
Definition at line 83 of file ScheduleHazardRecognizer.h.
|
inlinevirtual |
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 in llvm::ScoreboardHazardRecognizer, llvm::PPCHazardRecognizer970, llvm::ARMHazardRecognizer, and llvm::PPCScoreboardHazardRecognizer.
Definition at line 67 of file ScheduleHazardRecognizer.h.
|
protected |
MaxLookAhead - Indicate the number of cycles in the scoreboard state. Important to restore the state after backtracking. Additionally, MaxLookAhead=0 identifies a fake recognizer, allowing the client to bypass virtual calls. Currently the PostRA scheduler ignores it.
Definition at line 31 of file ScheduleHazardRecognizer.h.
Referenced by getMaxLookAhead(), isEnabled(), and llvm::ScoreboardHazardRecognizer::ScoreboardHazardRecognizer().