aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Transforms
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-02-06 01:16:28 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-02-06 01:16:28 +0000
commit570a4a5d9ca31f276a67502d1e0533d59d331fea (patch)
tree306ece29a43dcc79fe17a0665e6534ce137e4582 /include/llvm/Transforms
parent8d535859e583183591503aa63cd4559271803920 (diff)
downloadexternal_llvm-570a4a5d9ca31f276a67502d1e0533d59d331fea.zip
external_llvm-570a4a5d9ca31f276a67502d1e0533d59d331fea.tar.gz
external_llvm-570a4a5d9ca31f276a67502d1e0533d59d331fea.tar.bz2
Reintroduce the InlineHint function attribute.
This time it's for real! I am going to hook this up in the frontends as well. The inliner has some experimental heuristics for dealing with the inline hint. When given a -respect-inlinehint option, functions marked with the inline keyword are given a threshold just above the default for -O3. We need some experiments to determine if that is the right thing to do. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95466 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Transforms')
-rw-r--r--include/llvm/Transforms/IPO/InlinerPass.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/llvm/Transforms/IPO/InlinerPass.h b/include/llvm/Transforms/IPO/InlinerPass.h
index dc5e644..30ece0e 100644
--- a/include/llvm/Transforms/IPO/InlinerPass.h
+++ b/include/llvm/Transforms/IPO/InlinerPass.h
@@ -52,10 +52,11 @@ 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.
+ /// if the caller is marked with OptimizeForSize and -inline-threshold is not
+ /// given on the comand line. It is higher if the callee is marked with the
+ /// inlinehint attribute.
///
- unsigned getInlineThreshold(Function* Caller) const;
+ unsigned getInlineThreshold(CallSite CS) const;
/// getInlineCost - This method must be implemented by the subclass to
/// determine the cost of inlining the specified call site. If the cost