diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-01-20 17:51:28 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-01-20 17:51:28 +0000 |
commit | f8526cb711ec96cd2d5aff30da57f65ae8e5b7b8 (patch) | |
tree | a1685f66e8771db293312e810184dabcad6b99f8 /include/llvm/Transforms/IPO | |
parent | 32f6a8d923e70fc342a611a1446d3ea031d6afd2 (diff) | |
download | external_llvm-f8526cb711ec96cd2d5aff30da57f65ae8e5b7b8.zip external_llvm-f8526cb711ec96cd2d5aff30da57f65ae8e5b7b8.tar.gz external_llvm-f8526cb711ec96cd2d5aff30da57f65ae8e5b7b8.tar.bz2 |
Move per-function inline threshold calculation to a method.
No functional change except the forgotten test for
InlineLimit.getNumOccurrences() == 0 in the CurrentThreshold2 calculation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94007 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Transforms/IPO')
-rw-r--r-- | include/llvm/Transforms/IPO/InlinerPass.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Transforms/IPO/InlinerPass.h b/include/llvm/Transforms/IPO/InlinerPass.h index 5d00f42..dc5e644 100644 --- a/include/llvm/Transforms/IPO/InlinerPass.h +++ b/include/llvm/Transforms/IPO/InlinerPass.h @@ -51,6 +51,12 @@ struct Inliner : public CallGraphSCCPass { /// unsigned getInlineThreshold() const { return InlineThreshold; } + /// Calculate the inline threshold for given Caller. This threshold is lower + /// if Caller is marked with OptimizeForSize and -inline-threshold is not + /// given on the comand line. + /// + unsigned getInlineThreshold(Function* Caller) const; + /// getInlineCost - This method must be implemented by the subclass to /// determine the cost of inlining the specified call site. If the cost /// returned is greater than the current inline threshold, the call site is |