aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Transforms/IPO
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-03-24 06:37:48 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-03-24 06:37:48 +0000
commit8d84d5b62cdf2a772d51338136c7022a6e1ff931 (patch)
tree4ad44203af29e98cb7c89ddd60b731e582e9fd4a /include/llvm/Transforms/IPO
parent16b412c6e278d84bcf71b1bf07a7d3c24e81a49e (diff)
downloadexternal_llvm-8d84d5b62cdf2a772d51338136c7022a6e1ff931.zip
external_llvm-8d84d5b62cdf2a772d51338136c7022a6e1ff931.tar.gz
external_llvm-8d84d5b62cdf2a772d51338136c7022a6e1ff931.tar.bz2
Increasing the inline limit from (overly conservative) 200 to 300. Given each BB costs 20 and each instruction costs 5, 200 means a 4 BB function + 24 instructions (actually less because caller's size also contributes to it).
Furthermore, double the limit when more than 10% of the callee instructions are vector instructions. Multimedia kernels tend to love inlining. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48725 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Transforms/IPO')
-rw-r--r--include/llvm/Transforms/IPO/InlinerPass.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/Transforms/IPO/InlinerPass.h b/include/llvm/Transforms/IPO/InlinerPass.h
index 26cf4e4..d34641d 100644
--- a/include/llvm/Transforms/IPO/InlinerPass.h
+++ b/include/llvm/Transforms/IPO/InlinerPass.h
@@ -55,6 +55,11 @@ struct Inliner : public CallGraphSCCPass {
///
virtual int getInlineCost(CallSite CS) = 0;
+ // getInlineFudgeFactor - Return a > 1.0 factor if the inliner should use a
+ // higher threshold to determine if the function call should be inlined.
+ ///
+ virtual float getInlineFudgeFactor(CallSite CS) = 0;
+
private:
// InlineThreshold - Cache the value here for easy access.
unsigned InlineThreshold;