[PATCH] D52845: Update entry count for cold calls

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 12 11:13:22 PDT 2019


wenlei added a comment.
Herald added a project: LLVM.

@wmi @davidxl FYI, we have an internal patch to address this issue further. This patch only scales up entry count of outline function for cold callsites, thus losing context-sensitiveness. But ideally, we could reuse the entire profile from that inline context, and merge it all back to the outlined function. We changed the function annotation/inlining order to be top-down, then as we decide to not inline a cold call site, we merge the entire FunctionSamples of that inlinee back to outline counterpart, and since we process functions in top-down order (ignoring recursion for a second), annotation of the outline callee is able to use post merge FunctionSamples which is more accurate than simple scaling of entry count. (Doing context-sensitive inlining top-down has other benefits too, as it allows specialization whiling inlining which helps maximize the benefit of having context sensitive profile)

We'll upstream the changes later if you think it will be useful.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D52845





More information about the llvm-commits mailing list