[PATCH] D34312: [NewPM/Inliner] Reduce threshold for cold callsites in the non-PGO case
Easwaran Raman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 27 16:05:04 PDT 2017
eraman added a comment.
In https://reviews.llvm.org/D34312#792837, @chandlerc wrote:
> Also LGTM generally. Feel free to submit with updated (or current) threshold based on what makes the most sense to you. Also a minor comment below, lemme know if you want another look at the code if caching that ends up useful but weird/complex.
I have increased the threshold to 2. I've also fixed a thinko in constructing the ColdProb object (I wrote ColdProb(1, 100 * ColdCallSiteRelFreq), but it really should be ColdProb(ColdCallSiteRelFreq, 100). Will submit with these changes.
================
Comment at: lib/Analysis/InlineCost.cpp:658
+ CallerBFI->getBlockFreq(&(CS.getCaller()->getEntryBlock()));
+ return CallSiteFreq < CallerEntryFreq * ColdProb;
+}
----------------
chandlerc wrote:
> As mentioned earlier, is it possible to cache this so that we don't re-compute the scaled entry frequency for each callsite? Maybe there isn't a good place to cache it...
Discussed this offline with Chandler and we agreed that the effort to cache this not worth it unless this starts showing up in the profiles. I have added a comment reflecting this.
https://reviews.llvm.org/D34312
More information about the llvm-commits
mailing list