diff options
Diffstat (limited to 'include/llvm/CodeGen/ScheduleHazardRecognizer.h')
-rw-r--r-- | include/llvm/CodeGen/ScheduleHazardRecognizer.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/ScheduleHazardRecognizer.h b/include/llvm/CodeGen/ScheduleHazardRecognizer.h index 8a40e7212ff6..214be2794ba3 100644 --- a/include/llvm/CodeGen/ScheduleHazardRecognizer.h +++ b/include/llvm/CodeGen/ScheduleHazardRecognizer.h @@ -17,6 +17,7 @@ namespace llvm { +class MachineInstr; class SUnit; /// HazardRecognizer - This determines whether or not an instruction can be @@ -70,6 +71,10 @@ public: /// emitted, to advance the hazard state. virtual void EmitInstruction(SUnit *) {} + /// This overload will be used when the hazard recognizer is being used + /// by a non-scheduling pass, which does not use SUnits. + virtual void EmitInstruction(MachineInstr *) {} + /// PreEmitNoops - This callback is invoked prior to emitting an instruction. /// It should return the number of noops to emit prior to the provided /// instruction. @@ -79,6 +84,12 @@ public: return 0; } + /// This overload will be used when the hazard recognizer is being used + /// by a non-scheduling pass, which does not use SUnits. + virtual unsigned PreEmitNoops(MachineInstr *) { + return 0; + } + /// 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. |