[PATCH] D15401: Refactor threshold computation for inline cost analysis
David Li via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 9 22:32:24 PST 2015
davidxl added a comment.
I also don't see the need to pass CallsiteIndependent Threshold all the way down from SimpleInliner::getInlineCost all the way down to CallAnalyzer (without being used anywhere else) -- the CallAnalyzer can simply compute the CallSiteIndependentThreshold itself. This will greatly simplify the interfaces.
================
Comment at: lib/Analysis/InlineCost.cpp:1414
@@ +1413,3 @@
+
+static int getInlineThreshold(CallSite CS, int CallSiteIndependentThreshold) {
+
----------------
davidxl wrote:
> davidxl wrote:
> > davidxl wrote:
> > > Should it be a static member function of InlineCostAnalysis class?
> > Missing documentation of the method.
> The interface of this method also needs to be changed to take an additional callee function as the argument so that indirect callsite's threshold can be computed.
>
> The existing method can be a wrapper to this one.
Why do we need a threshold parameter here? The base threshold should be the default threshold.
Repository:
rL LLVM
http://reviews.llvm.org/D15401
More information about the llvm-commits
mailing list