summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2012-11-19 07:04:35 +0000
committerBob Wilson <bob.wilson@apple.com>2012-11-19 07:04:35 +0000
commit28f872f8a1945635f30763805c1418a90c6b345e (patch)
tree6df06bf3edfea101631ba42015150250d471ab4a /include
parent593423f7461fbbbf752ff013bf20c19ef95d3435 (diff)
downloadllvm-28f872f8a1945635f30763805c1418a90c6b345e.tar.gz
llvm-28f872f8a1945635f30763805c1418a90c6b345e.tar.bz2
llvm-28f872f8a1945635f30763805c1418a90c6b345e.tar.xz
Clean up handling of always-inline functions in the inliner.
This patch moves the isInlineViable function from the InlineAlways pass into the InlineCostAnalyzer and then changes the InlineCost computation to use that simple check for always-inline functions. All the special-case checks for AlwaysInline in the CallAnalyzer can then go away. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168300 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Analysis/InlineCost.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/Analysis/InlineCost.h b/include/llvm/Analysis/InlineCost.h
index af07d38169..82a3a566c9 100644
--- a/include/llvm/Analysis/InlineCost.h
+++ b/include/llvm/Analysis/InlineCost.h
@@ -129,6 +129,9 @@ namespace llvm {
// 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);
+
+ /// \brief Minimal filter to detect invalid constructs for inlining.
+ bool isInlineViable(Function &Callee);
};
}