summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-11-02 23:40:26 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-11-02 23:40:26 +0000
commit31a7eb40c1bf3b13a92656f0de644358ab017d70 (patch)
tree26a1e9225c007fa2e448e5f69a0f1fb96934eb72 /llvm/lib/Transforms
parentc2afd25ea14ffd24fa44f40d14b65f00386013a6 (diff)
downloadbcm5719-llvm-31a7eb40c1bf3b13a92656f0de644358ab017d70.tar.gz
bcm5719-llvm-31a7eb40c1bf3b13a92656f0de644358ab017d70.zip
Let the -inline-threshold command line argument take precedence over the
threshold given to createFunctionInliningPass(). Both opt -O3 and clang would silently ignore the -inline-threshold option. llvm-svn: 118117
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/IPO/Inliner.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp b/llvm/lib/Transforms/IPO/Inliner.cpp
index 4983e8e13a3..55f2815461a 100644
--- a/llvm/lib/Transforms/IPO/Inliner.cpp
+++ b/llvm/lib/Transforms/IPO/Inliner.cpp
@@ -52,7 +52,8 @@ Inliner::Inliner(char &ID)
: CallGraphSCCPass(ID), InlineThreshold(InlineLimit) {}
Inliner::Inliner(char &ID, int Threshold)
- : CallGraphSCCPass(ID), InlineThreshold(Threshold) {}
+ : CallGraphSCCPass(ID), InlineThreshold(InlineLimit.getNumOccurrences() > 0 ?
+ InlineLimit : Threshold) {}
/// getAnalysisUsage - For this class, we declare that we require and preserve
/// the call graph. If the derived class implements this method, it should
OpenPOWER on IntegriCloud