[all-commits] [llvm/llvm-project] 783bac: [ctx_prof] Handle `select` and its `step` instrume...

Mircea Trofin via All-commits all-commits at lists.llvm.org
Mon Sep 23 15:21:47 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 783bac7ffb8f0d58d7381d90fcaa082eb0be1c1d
      https://github.com/llvm/llvm-project/commit/783bac7ffb8f0d58d7381d90fcaa082eb0be1c1d
  Author: Mircea Trofin <mtrofin at google.com>
  Date:   2024-09-23 (Mon, 23 Sep 2024)

  Changed paths:
    M llvm/include/llvm/Analysis/CtxProfAnalysis.h
    M llvm/lib/Analysis/CtxProfAnalysis.cpp
    M llvm/lib/Transforms/Instrumentation/PGOCtxProfFlattening.cpp
    M llvm/lib/Transforms/Utils/InlineFunction.cpp
    A llvm/test/Analysis/CtxProfAnalysis/handle-select.ll

  Log Message:
  -----------
  [ctx_prof] Handle `select` and its `step` instrumentation (#109185)

The `step` instrumentation shouldn't be treated, during use, like an `increment`. The latter is treated as a BB ID. The step isn't that, it's more of a type of value profiling. We need to distinguish between the 2 when really looking for BB IDs (==increments), and handle appropriately `step`s. In particular, we need to know when to elide them because `select`s may get elided by function cloning, if the condition of the select is statically known.



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