diff options
author | Owen Rodley <orodley@google.com> | 2025-03-31 16:16:35 +1100 |
---|---|---|
committer | Owen Rodley <orodley@google.com> | 2025-08-05 09:54:41 +1000 |
commit | 3da1ceb81c1f17248babf0c0e2c07f23bd6b138b (patch) | |
tree | 03c39df6e5390d3eddcf5efac79f194c622f7a33 /llvm/lib/Passes/PassBuilder.cpp | |
parent | 9b195dc3ef66de2c1ff0048822b24a322ec3c52a (diff) | |
download | llvm-users/orodley/guid-2.zip llvm-users/orodley/guid-2.tar.gz llvm-users/orodley/guid-2.tar.bz2 |
Store GUIDs in metadatausers/orodley/guid-2
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.
Diffstat (limited to 'llvm/lib/Passes/PassBuilder.cpp')
-rw-r--r-- | llvm/lib/Passes/PassBuilder.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Passes/PassBuilder.cpp b/llvm/lib/Passes/PassBuilder.cpp index f810368..bb696ba 100644 --- a/llvm/lib/Passes/PassBuilder.cpp +++ b/llvm/lib/Passes/PassBuilder.cpp @@ -338,6 +338,7 @@ #include "llvm/Transforms/Scalar/TailRecursionElimination.h" #include "llvm/Transforms/Scalar/WarnMissedTransforms.h" #include "llvm/Transforms/Utils/AddDiscriminators.h" +#include "llvm/Transforms/Utils/AssignGUID.h" #include "llvm/Transforms/Utils/AssumeBundleBuilder.h" #include "llvm/Transforms/Utils/BreakCriticalEdges.h" #include "llvm/Transforms/Utils/CanonicalizeAliases.h" |