[PATCH] D96197: [CSSPGO] Add switches to control prelink/postlink inline separately

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 10 10:02:16 PST 2021


wenlei added a comment.

In D96197#2553329 <https://reviews.llvm.org/D96197#2553329>, @wmi wrote:

> Have you tried tuning the inline param instead of disabling CGSCC inlining in prelto? From our experience, thinlto wants some inlining happening in prelink phase especially for smaller callees so that the heuristic of choosing functions to import can be more effective. Current sampleFDO also turned off hot callsite inline heuristic in CGSCC inlining by setting the inline param, in order to prevent optimizations in prelink from obstructing profile annotation in postlink, but keep the other params the same. Feel using inline param for the tuning will be more flexible.

Yeah, the amount of inlining affects the importing due to call graph depth difference. The part you mentioned about turning off hot call site CGSCC inlining in prelto is the place where HotCallSiteThreshold is set to zero in buildInlinerPipeline, right? We would still have some inlining for small functions as they may end up with negative cost. Using threshold is more flexible and can achieve the same thing, though we'd need to pass four zero or negative thresholds (hot|regular x fdo|cgscc), so I thought switch would be a bit easier. It's somewhat similar to -fno-inline - we could theoretically achieve the same thing by tweaking thresholds too.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96197/new/

https://reviews.llvm.org/D96197



More information about the llvm-commits mailing list