Use a SmallPtrSet instead of std::set.
authorDale Johannesen <dalej@apple.com>
Mon, 23 Mar 2009 23:39:20 +0000 (23:39 +0000)
committerDale Johannesen <dalej@apple.com>
Mon, 23 Mar 2009 23:39:20 +0000 (23:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67578 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Transforms/IPO/InlinerPass.h
lib/Transforms/IPO/Inliner.cpp

index a0a11a12c34e797b173168dcaf55287c1e15c050..b370e964aa5961bdf915dad74b5e3735ba3b7374 100644 (file)
@@ -20,7 +20,6 @@
 #include "llvm/CallGraphSCCPass.h"
 #include "llvm/Transforms/Utils/InlineCost.h"
 #include "llvm/Target/TargetData.h"
-#include <set>
 
 
 namespace llvm {
@@ -48,7 +47,7 @@ struct Inliner : public CallGraphSCCPass {
 
   // InlineCallIfPossible
   bool InlineCallIfPossible(CallSite CS, CallGraph &CG,
-                            const std::set<Function*> &SCCFunctions,
+                            const SmallPtrSet<Function*, 8> &SCCFunctions,
                             const TargetData &TD);
 
   /// This method returns the value specified by the -inline-threshold value,
index c38a6ae414976b7f6280c20424855562aa6a2ef2..b589792022a709780be0e39f84768f908692cfa8 100644 (file)
@@ -52,7 +52,7 @@ void Inliner::getAnalysisUsage(AnalysisUsage &Info) const {
 // InlineCallIfPossible - If it is possible to inline the specified call site,
 // do so and update the CallGraph for this operation.
 bool Inliner::InlineCallIfPossible(CallSite CS, CallGraph &CG,
-                                 const std::set<Function*> &SCCFunctions,
+                                 const SmallPtrSet<Function*, 8> &SCCFunctions,
                                  const TargetData &TD) {
   Function *Callee = CS.getCalledFunction();
   Function *Caller = CS.getCaller();
@@ -128,7 +128,7 @@ bool Inliner::runOnSCC(const std::vector<CallGraphNode*> &SCC) {
   CallGraph &CG = getAnalysis<CallGraph>();
   TargetData &TD = getAnalysis<TargetData>();
 
-  std::set<Function*> SCCFunctions;
+  SmallPtrSet<Function*, 8> SCCFunctions;
   DOUT << "Inliner visiting SCC:";
   for (unsigned i = 0, e = SCC.size(); i != e; ++i) {
     Function *F = SCC[i]->getFunction();