[all-commits] [llvm/llvm-project] 5fdaf3: Store GUIDs in metadata

Owen Rodley via All-commits all-commits at lists.llvm.org
Sun Apr 27 20:49:26 PDT 2025


  Branch: refs/heads/users/orodley/guid-2
  Home:   https://github.com/llvm/llvm-project
  Commit: 5fdaf3389307dacdbbc54eea31cf131b7f7f4bd6
      https://github.com/llvm/llvm-project/commit/5fdaf3389307dacdbbc54eea31cf131b7f7f4bd6
  Author: Owen Rodley <orodley at google.com>
  Date:   2025-04-28 (Mon, 28 Apr 2025)

  Changed paths:
    M llvm/include/llvm/Analysis/CtxProfAnalysis.h
    M llvm/include/llvm/IR/FixedMetadataKinds.def
    M llvm/include/llvm/IR/GlobalValue.h
    A llvm/include/llvm/Transforms/Utils/AssignGUID.h
    M llvm/lib/Analysis/CtxProfAnalysis.cpp
    M llvm/lib/IR/Globals.cpp
    M llvm/lib/Passes/PassBuilder.cpp
    M llvm/lib/Passes/PassBuilderPipelines.cpp
    M llvm/lib/Transforms/Instrumentation/PGOCtxProfFlattening.cpp
    M llvm/lib/Transforms/Instrumentation/PGOCtxProfLowering.cpp
    A llvm/lib/Transforms/Utils/AssignGUID.cpp
    M llvm/lib/Transforms/Utils/CMakeLists.txt
    M llvm/lib/Transforms/Utils/CallPromotionUtils.cpp
    M llvm/lib/Transforms/Utils/InlineFunction.cpp

  Log Message:
  -----------
  Store GUIDs in metadata

See https://discourse.llvm.org/t/rfc-keep-globalvalue-guids-stable/84801
for context.

This takes the existing AssignGUID pass from CtxProfAnalysis, and runs
it by default, at the appropriate stages of the LTO pipeline. It also
changes GlobalValue::getGUID() to retrieve the GUID from the metadata
instead of computing it.

We don't yet have the supporting downstream changes to make a dedicated
GUID table in bitcode, nor do we use the metadata as part of ThinLTO --
it retains its existing mechanisms of recomputing GUIDs from separately
saved data. That will be changed later.



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