Provide a target override for the latest regalloc heuristic.
[oota-llvm.git] / include / llvm / Target / TargetRegisterInfo.h
index 22a2bde9cb41d2c605c9c5fd7a1e119cde30f91d..b3dbb9c9704952d9237fd21e3c12b3f8a4abe872 100644 (file)
@@ -683,6 +683,12 @@ public:
   /// (3) Bottom-up allocation is no longer guaranteed to optimally color.
   virtual bool reverseLocalAssignment() const { return false; }
 
+  /// Allow the target to override register assignment heuristics based on the
+  /// live range size. If this returns false, then local live ranges are always
+  /// assigned in order regardless of their size. This is a temporary hook for
+  /// debugging downstream codegen failures exposed by regalloc.
+  virtual bool mayOverrideLocalAssignment() const { return true; }
+
   /// requiresRegisterScavenging - returns true if the target requires (and can
   /// make use of) the register scavenger.
   virtual bool requiresRegisterScavenging(const MachineFunction &MF) const {