This patch changes the interface to enable the shrink wrapping optimization.
[oota-llvm.git] / include / llvm / CodeGen / Passes.h
index 5d829217447625dde566c007f6b0c5c98ec63c7c..8301dbe06648456555076deb102e1087f91b272b 100644 (file)
@@ -120,9 +120,6 @@ protected:
   /// Default setting for -enable-tail-merge on this target.
   bool EnableTailMerge;
 
-  /// Default setting for -enable-shrink-wrap on this target.
-  bool EnableShrinkWrap;
-
 public:
   TargetPassConfig(TargetMachine *tm, PassManagerBase &pm);
   // Dummy constructor.
@@ -190,9 +187,6 @@ public:
   /// Return true if the optimized regalloc pipeline is enabled.
   bool getOptimizeRegAlloc() const;
 
-  /// Return true if shrink wrapping is enabled.
-  bool getEnableShrinkWrap() const;
-
   /// Return true if the default global register allocator is in use and
   /// has not be overriden on the command line with '-regalloc=...'
   bool usingDefaultRegAlloc() const;
@@ -361,6 +355,14 @@ protected:
   /// Add a pass to perform basic verification of the machine function if
   /// verification is enabled.
   void addVerifyPass(const std::string &Banner);
+
+  /// Create an instance of ShrinkWrap using the runShrinkWrap predicate
+  /// function.  
+  FunctionPass *createShrinkWrapPass();
+  
+  /// Predicate function passed to a ShrinkWrap object to determine if shrink
+  /// wrapping should be run on a MachineFunction.
+  virtual bool runShrinkWrap(const MachineFunction &Fn) const;
 };
 } // namespace llvm