Move per-function inline threshold calculation to a method.

No functional change except the forgotten test for
InlineLimit.getNumOccurrences() == 0 in the CurrentThreshold2 calculation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94007 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen
2010-01-20 17:51:28 +00:00
parent 32f6a8d923
commit f8526cb711
2 changed files with 18 additions and 14 deletions

View File

@ -51,6 +51,12 @@ struct Inliner : public CallGraphSCCPass {
///
unsigned getInlineThreshold() const { return InlineThreshold; }
/// Calculate the inline threshold for given Caller. This threshold is lower
/// if Caller is marked with OptimizeForSize and -inline-threshold is not
/// given on the comand line.
///
unsigned getInlineThreshold(Function* Caller) const;
/// getInlineCost - This method must be implemented by the subclass to
/// determine the cost of inlining the specified call site. If the cost
/// returned is greater than the current inline threshold, the call site is