[all-commits] [llvm/llvm-project] 511500: [TypeProf][ICP]Allow vtable-comparison as long as ...

Mingming Liu via All-commits all-commits at lists.llvm.org
Tue Aug 27 11:51:45 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 511500e35159fb770f6a570f473beeb78d4091a4
      https://github.com/llvm/llvm-project/commit/511500e35159fb770f6a570f473beeb78d4091a4
  Author: Mingming Liu <mingmingl at google.com>
  Date:   2024-08-27 (Tue, 27 Aug 2024)

  Changed paths:
    M llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp
    M llvm/test/Transforms/PGOProfile/icp_vtable_cmp.ll

  Log Message:
  -----------
  [TypeProf][ICP]Allow vtable-comparison as long as vtable count is comparable with function count for each candidate (#106260)

The current cost-benefit analysis between vtable comparison and function
comparison require the indirect fallback branch to be cold. This is too
conservative.

This change allows vtable-comparison as long as vtable count is
comparable with function count for each function candidate and removes
the cold indirect fallback requirement.

Tested:
1. Testing this on benchmarks uplifts the measurable performance wins.
Counting the (possibly-duplicated) remarks (because of linkonce_odr
functions, cross-module import of functions) show the number of vtable
remarks increases from ~30k-ish to 50k-ish.
2. https://gcc.godbolt.org/z/sbGK7Pacn shows vtable-comparison doesn't
happen today (using the same IR input)



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list