summaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/InlineCost.h
diff options
context:
space:
mode:
authorDavid Chisnall <csdavec@swan.ac.uk>2012-04-06 17:27:41 +0000
committerDavid Chisnall <csdavec@swan.ac.uk>2012-04-06 17:27:41 +0000
commitb381578fcb5fea988f661dbbee9747b8fd55c5fb (patch)
tree7d93ff26b1e2a738d77e91edfc5443eb1c25949b /include/llvm/Analysis/InlineCost.h
parent9ceebb7e92e980340d199b550e3a2110c80ea871 (diff)
downloadllvm-b381578fcb5fea988f661dbbee9747b8fd55c5fb.tar.gz
llvm-b381578fcb5fea988f661dbbee9747b8fd55c5fb.tar.bz2
llvm-b381578fcb5fea988f661dbbee9747b8fd55c5fb.tar.xz
Reintroduce InlineCostAnalyzer::getInlineCost() variant with explicit callee
parameter until we have a more sensible API for doing the same thing. Reviewed by Chandler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154180 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/InlineCost.h')
-rw-r--r--include/llvm/Analysis/InlineCost.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/Analysis/InlineCost.h b/include/llvm/Analysis/InlineCost.h
index f5784a751c..691c2d19be 100644
--- a/include/llvm/Analysis/InlineCost.h
+++ b/include/llvm/Analysis/InlineCost.h
@@ -117,6 +117,15 @@ namespace llvm {
/// bound the computation necessary to determine whether the cost is
/// sufficiently low to warrant inlining.
InlineCost getInlineCost(CallSite CS, int Threshold);
+ /// 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. This
+ /// behaves exactly as the version with no explicit callee parameter in all
+ /// other respects.
+ //
+ // Note: This is used by out-of-tree passes, please do not remove without
+ // adding a replacement API.
+ InlineCost getInlineCost(CallSite CS, Function *Callee, int Threshold);
};
/// callIsSmall - If a call is likely to lower to a single target instruction,