From 29381fb7cdba040facf562f4ea028400cd626d2b Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Fri, 27 Jul 2007 18:34:27 +0000 Subject: [PATCH] Use SmallPtrSet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40560 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Transforms/Utils/InlineCost.h | 4 ++-- lib/Transforms/IPO/InlineSimple.cpp | 5 +++-- lib/Transforms/Utils/BasicInliner.cpp | 3 +-- 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 c54b98af523..509217b00c7 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 +#include "llvm/ADT/SmallPtrSet.h" #include #include @@ -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 &NeverInline); + int getInlineCost(CallSite CS, SmallPtrSet &NeverInline); }; } diff --git a/lib/Transforms/IPO/InlineSimple.cpp b/lib/Transforms/IPO/InlineSimple.cpp index eea28a745c5..38bf0610b38 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 +#include "llvm/ADT/SmallPtrSet.h" using namespace llvm; namespace { class VISIBILITY_HIDDEN SimpleInliner : public Inliner { - std::set NeverInline; // Functions that are never inlined + // Functions that are never inlined + SmallPtrSet NeverInline; InlineCostAnalyzer CA; public: SimpleInliner() : Inliner(&ID) {} diff --git a/lib/Transforms/Utils/BasicInliner.cpp b/lib/Transforms/Utils/BasicInliner.cpp index 871b1a504a3..9325d5f2e04 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 -#include using namespace llvm; @@ -65,7 +64,7 @@ namespace llvm { private: TargetData *TD; std::vector Functions; - std::set NeverInline; + SmallPtrSet NeverInline; SmallPtrSet DeadFunctions; InlineCostAnalyzer CA; }; diff --git a/lib/Transforms/Utils/InlineCost.cpp b/lib/Transforms/Utils/InlineCost.cpp index 8b34427ac67..c568355a5f3 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 &NeverInline) { +int InlineCostAnalyzer::getInlineCost(CallSite CS, SmallPtrSet &NeverInline) { Instruction *TheCall = CS.getInstruction(); Function *Callee = CS.getCalledFunction(); const Function *Caller = TheCall->getParent()->getParent(); -- 2.34.1