[all-commits] [llvm/llvm-project] a004c7: [PGO] Make the PGO instrumentation insert point af...

xur-llvm via All-commits all-commits at lists.llvm.org
Fri May 30 14:37:27 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a004c703bcf7a563415ca872c98a415edda36e6e
      https://github.com/llvm/llvm-project/commit/a004c703bcf7a563415ca872c98a415edda36e6e
  Author: xur-llvm <59886942+xur-llvm at users.noreply.github.com>
  Date:   2025-05-30 (Fri, 30 May 2025)

  Changed paths:
    M llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
    A llvm/test/Transforms/PGOProfile/entry_alloca.ll
    M llvm/test/Transforms/PGOProfile/split-indirectbr-critical-edges.ll

  Log Message:
  -----------
  [PGO] Make the PGO instrumentation insert point after alloca (#142043)

We're changing PGO instrumentation to insert the intrinsic after alloca
instructions. For sampled instrumentation, a conditional check is placed
before the intrinsic. If this intrinsic comes before an alloca, the
alloca (whose size might be unknown due to Phi node) becomes
conditional, resulting in inefficient code. We have seen some stack
overflows due to this.

This patch guarantees the intrinsic is always after the alloca.



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