From 16581bf931c0ccf2f8993397acfa4e1d509a68dc Mon Sep 17 00:00:00 2001 From: Dale Johannesen Date: Mon, 23 Mar 2009 23:39:20 +0000 Subject: [PATCH] Use a SmallPtrSet instead of std::set. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67578 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Transforms/IPO/InlinerPass.h | 3 +-- lib/Transforms/IPO/Inliner.cpp | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/llvm/Transforms/IPO/InlinerPass.h b/include/llvm/Transforms/IPO/InlinerPass.h index a0a11a12c34..b370e964aa5 100644 --- a/include/llvm/Transforms/IPO/InlinerPass.h +++ b/include/llvm/Transforms/IPO/InlinerPass.h @@ -20,7 +20,6 @@ #include "llvm/CallGraphSCCPass.h" #include "llvm/Transforms/Utils/InlineCost.h" #include "llvm/Target/TargetData.h" -#include namespace llvm { @@ -48,7 +47,7 @@ struct Inliner : public CallGraphSCCPass { // InlineCallIfPossible bool InlineCallIfPossible(CallSite CS, CallGraph &CG, - const std::set &SCCFunctions, + const SmallPtrSet &SCCFunctions, const TargetData &TD); /// This method returns the value specified by the -inline-threshold value, diff --git a/lib/Transforms/IPO/Inliner.cpp b/lib/Transforms/IPO/Inliner.cpp index c38a6ae4149..b589792022a 100644 --- a/lib/Transforms/IPO/Inliner.cpp +++ b/lib/Transforms/IPO/Inliner.cpp @@ -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 &SCCFunctions, + const SmallPtrSet &SCCFunctions, const TargetData &TD) { Function *Callee = CS.getCalledFunction(); Function *Caller = CS.getCaller(); @@ -128,7 +128,7 @@ bool Inliner::runOnSCC(const std::vector &SCC) { CallGraph &CG = getAnalysis(); TargetData &TD = getAnalysis(); - std::set SCCFunctions; + SmallPtrSet SCCFunctions; DOUT << "Inliner visiting SCC:"; for (unsigned i = 0, e = SCC.size(); i != e; ++i) { Function *F = SCC[i]->getFunction();