[llvm] [ctx_prof] CtxProfAnalysis: populate module data (PR #102930)
Mircea Trofin via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 14 14:18:45 PDT 2024
================
@@ -66,6 +66,36 @@ Value toJSON(const PGOCtxProfContext::CallTargetMapTy &P) {
} // namespace json
} // namespace llvm
+const char *AssignUniqueIDPass::GUIDMetadataName = "unique_id";
+
+PreservedAnalyses AssignUniqueIDPass::run(Module &M,
+ ModuleAnalysisManager &MAM) {
+ for (auto &F : M.functions()) {
+ if (F.isDeclaration())
+ continue;
+ if (F.getMetadata(GUIDMetadataName))
----------------
mtrofin wrote:
done
https://github.com/llvm/llvm-project/pull/102930
More information about the llvm-commits
mailing list