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

xur-llvm via All-commits all-commits at lists.llvm.org
Thu May 29 15:48:25 PDT 2025


  Branch: refs/heads/users/xur-llvm/pgowork
  Home:   https://github.com/llvm/llvm-project
  Commit: 834741e6591d879908a19e1d21526a5a66523d5e
      https://github.com/llvm/llvm-project/commit/834741e6591d879908a19e1d21526a5a66523d5e
  Author: Rong Xu <xur at google.com>
  Date:   2025-05-29 (Thu, 29 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

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