summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/InlineCost.cpp
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
commitc1c9cdab231ed88b5433e0b6e9001a9f175fa67f (patch)
tree4eced996cf9328f665cf8c9b24d9ba2d8fd7eabc /llvm/lib/Analysis/InlineCost.cpp
parent49da93396eb2058fcf19ed7da2b73e854955fff8 (diff)
downloadbcm5719-llvm-c1c9cdab231ed88b5433e0b6e9001a9f175fa67f.tar.gz
bcm5719-llvm-c1c9cdab231ed88b5433e0b6e9001a9f175fa67f.zip
Reintroduce InlineCostAnalyzer::getInlineCost() variant with explicit callee
parameter until we have a more sensible API for doing the same thing. Reviewed by Chandler. llvm-svn: 154180
Diffstat (limited to 'llvm/lib/Analysis/InlineCost.cpp')
-rw-r--r--llvm/lib/Analysis/InlineCost.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp
index 246e679b21d..c4599c805d6 100644
--- a/llvm/lib/Analysis/InlineCost.cpp
+++ b/llvm/lib/Analysis/InlineCost.cpp
@@ -988,8 +988,11 @@ void CallAnalyzer::dump() {
}
InlineCost InlineCostAnalyzer::getInlineCost(CallSite CS, int Threshold) {
- Function *Callee = CS.getCalledFunction();
+ return getInlineCost(CS, CS.getCalledFunction(), Threshold);
+}
+InlineCost InlineCostAnalyzer::getInlineCost(CallSite CS, Function *Callee,
+ int Threshold) {
// Don't inline functions which can be redefined at link-time to mean
// something else. Don't inline functions marked noinline or call sites
// marked noinline.
OpenPOWER on IntegriCloud