Implement bitfield clears
[oota-llvm.git] / lib / Transforms / IPO / Inliner.h
index 805876c54d6f7dd45bf640560fa20384c74369f1..f937be2a53609628bc31f36c978facd8069a41c6 100644 (file)
 
 #define DEBUG_TYPE "inline"
 #include "llvm/CallGraphSCCPass.h"
-#include <set>
 
 namespace llvm {
-
-class CallSite;
+  class CallSite;
 
 /// Inliner - This class contains all of the helper code which is used to
 /// perform the inlining operations that does not depend on the policy.
@@ -35,6 +33,11 @@ struct Inliner : public CallGraphSCCPass {
   // Pass class.
   virtual bool runOnSCC(const std::vector<CallGraphNode *> &SCC);
 
+  // doFinalization - Remove now-dead linkonce functions at the end of
+  // processing to avoid breaking the SCC traversal.
+  virtual bool doFinalization(CallGraph &CG);
+
+
   /// This method returns the value specified by the -inline-threshold value,
   /// specified on the command line.  This is typically not directly needed.
   ///
@@ -46,22 +49,10 @@ struct Inliner : public CallGraphSCCPass {
   /// not inlined.
   ///
   virtual int getInlineCost(CallSite CS) = 0;
-  
-  /// getRecursiveInlineCost - This method can be implemented by subclasses if
-  /// it wants to treat calls to functions within the current SCC specially.  If
-  /// this method is not overloaded, it just chains to getInlineCost().
-  ///
-  virtual int getRecursiveInlineCost(CallSite CS);
 
 private:
   // InlineThreshold - Cache the value here for easy access.
   unsigned InlineThreshold;
-
-  // IsRecursiveFunction - This contains all functions which are directly
-  // recursive, which we do NOT want to inline into other functions.
-  std::set<Function*> IsRecursiveFunction;
-
-  bool performInlining(CallSite CS, std::set<Function*> &SCC);
 };
 
 } // End llvm namespace