[PATCH] D70655: [AutoFDO] Top-down Inlining for specialization with context-sensitive profile

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 25 11:23:17 PST 2019


wenlei added a comment.

In D70655#1759165 <https://reviews.llvm.org/D70655#1759165>, @davidxl wrote:

> One way to handle it is 1) delay early inlining of sites into a hot function if a big percentage of calls to the function are from other modules. This still allows intra module top down inlining of it; or 2) keep a clone of the unlined body of the original function and use that one during cross module inlining.


Both would work for leveraging context-sensitive profile to drive better inlining with specialization, if profile at the time of processing a specific function is accurate. However, the problem of not having cross-module profile adjustment for inlining still exists. With top-down inlining, profile adjustment and PGO inlining is an iterative process. In call graph, lower function's inlining relies on higher function's inlining (and its profile adjustment). So not being able to adjust profile cross thin-backends not only affects post-inline profile fidelity, it also limits PGO inlining..

In short, I think the two ideas will give us some mechanism to do specialization during inlining, but it still misses good (adjusted) profile that drives that kind of inlining.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70655





More information about the llvm-commits mailing list