[PATCH] D120784: [CSSPGO][PriorityInliner] Do not use block weight to drive callsite inlining.

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 1 16:07:58 PST 2022


hoy created this revision.
Herald added subscribers: ormris, modimo, wenlei, hiraditya.
Herald added a project: All.
hoy requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The priority-based inliner currenlty uses block count combined with callee entry count to drive callsite inlining. This doesn't work well with LTO where postlink inlining is driven by prelink-annotated block count which could be based on the merge of all context profiles. I'm fixing it by using callee profile entry count only which should be context-sensitive.

I'm seeing 0.2% perf improvment for one of our internal large benchmarks with probe-based non-CS profile.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D120784

Files:
  llvm/lib/Transforms/IPO/SampleProfile.cpp
  llvm/test/Transforms/SampleProfile/Inputs/profile-context-order-scc.prof
  llvm/test/Transforms/SampleProfile/Inputs/profile-context-order.prof
  llvm/test/Transforms/SampleProfile/csspgo-inline-icall.ll
  llvm/test/Transforms/SampleProfile/csspgo-inline.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120784.412286.patch
Type: text/x-patch
Size: 7318 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220302/adae12d5/attachment.bin>


More information about the llvm-commits mailing list