[all-commits] [llvm/llvm-project] 07846e: [CSSPGO][PriorityInliner] Do not use block weight ...

Hongtao Yu via All-commits all-commits at lists.llvm.org
Tue Mar 1 18:43:37 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 07846e3387a6aa323d28c79ff055f1ad5622386c
      https://github.com/llvm/llvm-project/commit/07846e3387a6aa323d28c79ff055f1ad5622386c
  Author: Hongtao Yu <hoy at fb.com>
  Date:   2022-03-01 (Tue, 01 Mar 2022)

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

  Log Message:
  -----------
  [CSSPGO][PriorityInliner] Do not use block weight to drive callsite inlining.

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.

Reviewed By: wenlei

Differential Revision: https://reviews.llvm.org/D120784




More information about the All-commits mailing list