LLVM API Documentation

llvm::SimpleHazardRecognizer Class Reference

#include <SimpleHazardRecognizer.h>

Inheritance diagram for llvm::SimpleHazardRecognizer:
[legend]
Collaboration diagram for llvm::SimpleHazardRecognizer:
[legend]

List of all members.

Public Member Functions

 SimpleHazardRecognizer ()
virtual HazardType getHazardType (SUnit *SU)
virtual void Reset ()
virtual void EmitInstruction (SUnit *SU)
virtual void AdvanceCycle ()


Detailed Description

SimpleHazardRecognizer - A *very* simple hazard recognizer. It uses a coarse classification and attempts to avoid that instructions of a given class aren't grouped too densely together.

Definition at line 28 of file SimpleHazardRecognizer.h.


Constructor & Destructor Documentation

llvm::SimpleHazardRecognizer::SimpleHazardRecognizer (  )  [inline]

Definition at line 57 of file SimpleHazardRecognizer.h.

References Reset().


Member Function Documentation

virtual HazardType llvm::SimpleHazardRecognizer::getHazardType ( SUnit *   )  [inline, 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::ScheduleHazardRecognizer.

Definition at line 61 of file SimpleHazardRecognizer.h.

References llvm::array_lengthof(), llvm::ScheduleHazardRecognizer::Hazard, and llvm::ScheduleHazardRecognizer::NoHazard.

virtual void llvm::SimpleHazardRecognizer::Reset (  )  [inline, 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::ScheduleHazardRecognizer.

Definition at line 74 of file SimpleHazardRecognizer.h.

References llvm::array_lengthof().

Referenced by SimpleHazardRecognizer().

virtual void llvm::SimpleHazardRecognizer::EmitInstruction ( SUnit *   )  [inline, virtual]

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

Reimplemented from llvm::ScheduleHazardRecognizer.

Definition at line 79 of file SimpleHazardRecognizer.h.

virtual void llvm::SimpleHazardRecognizer::AdvanceCycle (  )  [inline, virtual]

AdvanceCycle - This callback is invoked when no instructions can be issued on this cycle without a hazard. This should increment the internal state of the hazard recognizer so that previously "Hazard" instructions will now not be hazards.

Reimplemented from llvm::ScheduleHazardRecognizer.

Definition at line 83 of file SimpleHazardRecognizer.h.


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