[all-commits] [llvm/llvm-project] aca01b: [ctx_prof] CtxProfAnalysis: populate module data (...

Mircea Trofin via All-commits all-commits at lists.llvm.org
Wed Aug 14 18:46:47 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: aca01bff07c225dbace6cb7743072ddfe78c43f0
      https://github.com/llvm/llvm-project/commit/aca01bff07c225dbace6cb7743072ddfe78c43f0
  Author: Mircea Trofin <mtrofin at google.com>
  Date:   2024-08-14 (Wed, 14 Aug 2024)

  Changed paths:
    M llvm/include/llvm/Analysis/CtxProfAnalysis.h
    M llvm/lib/Analysis/CtxProfAnalysis.cpp
    M llvm/lib/Passes/PassBuilderPipelines.cpp
    M llvm/lib/Passes/PassRegistry.def
    M llvm/lib/Transforms/Instrumentation/PGOCtxProfLowering.cpp
    A llvm/test/Analysis/CtxProfAnalysis/full-cycle.ll
    M llvm/test/Analysis/CtxProfAnalysis/load.ll
    M llvm/test/Transforms/PGOProfile/ctx-instrumentation.ll
    M llvm/test/Transforms/PGOProfile/ctx-prof-use-prelink.ll

  Log Message:
  -----------
  [ctx_prof] CtxProfAnalysis: populate module data (#102930)

Continuing from #102084, which introduced the analysis, we now populate
it with info about functions contained in the module.

When we will update the profile due to e.g. inlined callsites, we'll
ingest the callee's counters and callsites to the caller. We'll move
those to the caller's respective index space (counter and callers), so
we need to know and maintain where those currently end.

We also don't need to keep profiles not pertinent to this module.

This patch also introduces an arguably much simpler way to track the
GUID of a function from the frontend compilation, through ThinLTO, and
into the post-thinlink compilation step, which doesn't rely on keeping
names around. A separate RFC and patches will discuss extending this to
the current PGO (instrumented and sampled) and other consumers as an
infrastructural component.



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