summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorXinliang David Li <davidxl@google.com>2016-04-29 21:21:44 +0000
committerXinliang David Li <davidxl@google.com>2016-04-29 21:21:44 +0000
commit1ffa28a3f1cb1cc61c8937027015a549c60d18dc (patch)
tree408d11150e887efd2ec20e941bff8e1ff7b8138e /llvm/include
parent7da9b445eacd8e19b0da5c29d559ee5db0a33952 (diff)
downloadbcm5719-llvm-1ffa28a3f1cb1cc61c8937027015a549c60d18dc.tar.gz
bcm5719-llvm-1ffa28a3f1cb1cc61c8937027015a549c60d18dc.zip
[inliner]: Refactor inline deferring logic into its own method /NFC
The implemented heuristic has a large body of code which better sits in its own function for better readability. It also allows adding more heuristics easier in the future. llvm-svn: 268107
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/Transforms/IPO/InlinerPass.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/include/llvm/Transforms/IPO/InlinerPass.h b/llvm/include/llvm/Transforms/IPO/InlinerPass.h
index 40766c6f8b8..111bc860aba 100644
--- a/llvm/include/llvm/Transforms/IPO/InlinerPass.h
+++ b/llvm/include/llvm/Transforms/IPO/InlinerPass.h
@@ -69,6 +69,10 @@ private:
/// shouldInline - Return true if the inliner should attempt to
/// inline at the given CallSite.
bool shouldInline(CallSite CS);
+ /// Return true if inlining of CS can block the caller from being
+ /// inlined which is proved to be more beneficial. \p IC is the
+ /// estimated inline cost associated with callsite \p CS.
+ bool shouldBeDeferred(Function *Caller, CallSite CS, InlineCost IC);
protected:
AssumptionCacheTracker *ACT;
OpenPOWER on IntegriCloud