diff options
author | Chris Lattner <sabre@nondot.org> | 2008-01-12 06:49:13 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-01-12 06:49:13 +0000 |
commit | 120d053e3ba810b44047fbcb719824bed5673ca9 (patch) | |
tree | d6faed5fff16ad6f2b84b013962451e628c22b6b /lib/Transforms/IPO/InlineSimple.cpp | |
parent | d3f6a8a8f05844753fab3d7c896a373603257f5a (diff) | |
download | external_llvm-120d053e3ba810b44047fbcb719824bed5673ca9.zip external_llvm-120d053e3ba810b44047fbcb719824bed5673ca9.tar.gz external_llvm-120d053e3ba810b44047fbcb719824bed5673ca9.tar.bz2 |
Allow clients to specify the inline threshold when creating
the inliner pass. Patch by Robert Zeh.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45903 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/InlineSimple.cpp')
-rw-r--r-- | lib/Transforms/IPO/InlineSimple.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Transforms/IPO/InlineSimple.cpp b/lib/Transforms/IPO/InlineSimple.cpp index d72edf8..fe0ea5a 100644 --- a/lib/Transforms/IPO/InlineSimple.cpp +++ b/lib/Transforms/IPO/InlineSimple.cpp @@ -35,6 +35,7 @@ namespace { InlineCostAnalyzer CA; public: SimpleInliner() : Inliner(&ID) {} + SimpleInliner(int Threshold) : Inliner(&ID, Threshold) {} static char ID; // Pass identification, replacement for typeid int getInlineCost(CallSite CS) { return CA.getInlineCost(CS, NeverInline); @@ -47,6 +48,10 @@ namespace { Pass *llvm::createFunctionInliningPass() { return new SimpleInliner(); } +Pass *llvm::createFunctionInliningPass(int Threshold) { + return new SimpleInliner(Threshold); +} + // doInitialization - Initializes the vector of functions that have been // annotated with the noinline attribute. bool SimpleInliner::doInitialization(CallGraph &CG) { |