[C++11] Add 'override' keyword to virtual methods that override their base class.
[oota-llvm.git] / include / llvm / Target / TargetRegisterInfo.h
index 5f50e402b9ceaeb900f47c55318f3df05db44219..b3dbb9c9704952d9237fd21e3c12b3f8a4abe872 100644 (file)
@@ -675,14 +675,20 @@ public:
   /// Allow the target to reverse allocation order of local live ranges. This
   /// will generally allocate shorter local live ranges first. For targets with
   /// many registers, this could reduce regalloc compile time by a large
-  /// factor. It should still achieve optimal coloring; however, it can change
-  /// register eviction decisions. It is disabled by default for two reasons:
+  /// factor. It is disabled by default for three reasons:
   /// (1) Top-down allocation is simpler and easier to debug for targets that
   /// don't benefit from reversing the order.
   /// (2) Bottom-up allocation could result in poor evicition decisions on some
   /// targets affecting the performance of compiled code.
+  /// (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 {