[PATCH] D71645: [NFC][InlineCost] Simplify internal inlining cost interface
Mircea Trofin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 19 13:03:11 PST 2019
mtrofin added a comment.
In D71645#1791582 <https://reviews.llvm.org/D71645#1791582>, @davidxl wrote:
> There is comment like this:
>
> /// The candidate callsite being analyzed. Please do not use this to do
> /// analysis in the caller function; we want the inline cost query to be
> /// easily cacheable. Instead, use the cover function paramHasAttr.
> CallBase &CandidateCall;
>
>
> Can you find out the history of this field?
It seems it was introduced here: http://reviews.llvm.org/D9129. analyzeCall was already taking a CallSite parameter.
> On the other hand, if a different callsite is passed to analyzeCall other than CandidateCall, it will produce wrong results.
That's the thing: the API is local to this file, and there is no case when we pass a different parameter to analyzeCall, than the parameter used to construct the CallAnalyzer object.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71645/new/
https://reviews.llvm.org/D71645
More information about the llvm-commits
mailing list