misched: handle on-the-fly regpressure queries better for 2-addr
[oota-llvm.git] / include / llvm / CodeGen / ScheduleHazardRecognizer.h
index 4771a35bc78e85eaaa6ccd95d68aa7990c9f5237..9dfa3446ef50fe33fa30eee80324d4fba71bfc0e 100644 (file)
@@ -42,8 +42,12 @@ public:
 
   unsigned getMaxLookAhead() const { return MaxLookAhead; }
 
+  bool isEnabled() const { return MaxLookAhead != 0; }
+
   /// atIssueLimit - Return true if no more instructions may be issued in this
   /// cycle.
+  ///
+  /// FIXME: remove this once MachineScheduler is the only client.
   virtual bool atIssueLimit() const { return false; }
 
   /// getHazardType - Return the hazard type of emitting this node.  There are
@@ -53,7 +57,7 @@ public:
   ///     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.
-  virtual HazardType getHazardType(SUnit *m, int Stalls) {
+  virtual HazardType getHazardType(SUnit *m, int Stalls = 0) {
     return NoHazard;
   }