diff options
-rw-r--r-- | include/llvm/Transforms/Utils/InlineCost.h | 4 | ||||
-rw-r--r-- | lib/Transforms/IPO/InlineSimple.cpp | 5 | ||||
-rw-r--r-- | lib/Transforms/Utils/BasicInliner.cpp | 3 | ||||
-rw-r--r-- | lib/Transforms/Utils/InlineCost.cpp | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/include/llvm/Transforms/Utils/InlineCost.h b/include/llvm/Transforms/Utils/InlineCost.h index c54b98af52..509217b00c 100644 --- a/include/llvm/Transforms/Utils/InlineCost.h +++ b/include/llvm/Transforms/Utils/InlineCost.h @@ -14,7 +14,7 @@ #ifndef INLINECOST_H #define INLINECOST_H -#include <set> +#include "llvm/ADT/SmallPtrSet.h" #include <map> #include <vector> @@ -73,7 +73,7 @@ namespace llvm { // getInlineCost - The heuristic used to determine if we should inline the // function call or not. // - int getInlineCost(CallSite CS, std::set<const Function *> &NeverInline); + int getInlineCost(CallSite CS, SmallPtrSet<const Function *, 16> &NeverInline); }; } diff --git a/lib/Transforms/IPO/InlineSimple.cpp b/lib/Transforms/IPO/InlineSimple.cpp index eea28a745c..38bf0610b3 100644 --- a/lib/Transforms/IPO/InlineSimple.cpp +++ b/lib/Transforms/IPO/InlineSimple.cpp @@ -23,14 +23,15 @@ #include "llvm/Transforms/IPO.h" #include "llvm/Transforms/IPO/InlinerPass.h" #include "llvm/Transforms/Utils/InlineCost.h" -#include <set> +#include "llvm/ADT/SmallPtrSet.h" using namespace llvm; namespace { class VISIBILITY_HIDDEN SimpleInliner : public Inliner { - std::set<const Function*> NeverInline; // Functions that are never inlined + // Functions that are never inlined + SmallPtrSet<const Function*, 16> NeverInline; InlineCostAnalyzer CA; public: SimpleInliner() : Inliner(&ID) {} diff --git a/lib/Transforms/Utils/BasicInliner.cpp b/lib/Transforms/Utils/BasicInliner.cpp index 871b1a504a..9325d5f2e0 100644 --- a/lib/Transforms/Utils/BasicInliner.cpp +++ b/lib/Transforms/Utils/BasicInliner.cpp @@ -23,7 +23,6 @@ #include "llvm/Support/Debug.h" #include "llvm/ADT/SmallPtrSet.h" #include <vector> -#include <set> using namespace llvm; @@ -65,7 +64,7 @@ namespace llvm { private: TargetData *TD; std::vector<Function *> Functions; - std::set<const Function *> NeverInline; + SmallPtrSet<const Function *, 16> NeverInline; SmallPtrSet<Function *, 8> DeadFunctions; InlineCostAnalyzer CA; }; diff --git a/lib/Transforms/Utils/InlineCost.cpp b/lib/Transforms/Utils/InlineCost.cpp index 8b34427ac6..c568355a5f 100644 --- a/lib/Transforms/Utils/InlineCost.cpp +++ b/lib/Transforms/Utils/InlineCost.cpp @@ -141,7 +141,7 @@ void InlineCostAnalyzer::FunctionInfo::analyzeFunction(Function *F) { // getInlineCost - The heuristic used to determine if we should inline the // function call or not. // -int InlineCostAnalyzer::getInlineCost(CallSite CS, std::set<const Function *> &NeverInline) { +int InlineCostAnalyzer::getInlineCost(CallSite CS, SmallPtrSet<const Function *, 16> &NeverInline) { Instruction *TheCall = CS.getInstruction(); Function *Callee = CS.getCalledFunction(); const Function *Caller = TheCall->getParent()->getParent(); |