aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm
diff options
context:
space:
mode:
authorDavid Chisnall <csdavec@swan.ac.uk>2010-05-01 15:47:41 +0000
committerDavid Chisnall <csdavec@swan.ac.uk>2010-05-01 15:47:41 +0000
commit752e2590585227f6f10e80978f587915d9adb2ad (patch)
tree687b45384f18dd362b77e95db254d555f17fb8aa /include/llvm
parent17458a786e4d3eeff9c66fc0ec284b763df53642 (diff)
downloadexternal_llvm-752e2590585227f6f10e80978f587915d9adb2ad.zip
external_llvm-752e2590585227f6f10e80978f587915d9adb2ad.tar.gz
external_llvm-752e2590585227f6f10e80978f587915d9adb2ad.tar.bz2
Added a variant of InlineCostAnalyzer::getInlineCost() that takes the called function as an explicit argument, for use when inlining function pointers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102841 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/Analysis/InlineCost.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/Analysis/InlineCost.h b/include/llvm/Analysis/InlineCost.h
index e7d4eb7..d51dd6c 100644
--- a/include/llvm/Analysis/InlineCost.h
+++ b/include/llvm/Analysis/InlineCost.h
@@ -176,6 +176,14 @@ namespace llvm {
///
InlineCost getInlineCost(CallSite CS,
SmallPtrSet<const Function *, 16> &NeverInline);
+ /// getCalledFunction - The heuristic used to determine if we should inline
+ /// the function call or not. The callee is explicitly specified, to allow
+ /// you to calculate the cost of inlining a function via a pointer. The
+ /// result assumes that the inlined version will always be used. You should
+ /// weight it yourself in cases where this callee will not always be called.
+ InlineCost getInlineCost(CallSite CS,
+ Function *Callee,
+ SmallPtrSet<const Function *, 16> &NeverInline);
/// getInlineFudgeFactor - Return a > 1.0 factor if the inliner should use a
/// higher threshold to determine if the function call should be inlined.