[llvm] [ctx_prof] CtxProfAnalysis: populate module data (PR #102930)
Snehasish Kumar via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 12 14:35:12 PDT 2024
================
@@ -24,5 +24,26 @@ class PGOCtxProfLoweringPass : public PassInfoMixin<PGOCtxProfLoweringPass> {
PreservedAnalyses run(Module &M, ModuleAnalysisManager &MAM);
};
+
+/// Assign a GUID to functions as metadata. GUID calculation takes linkage into
+/// account, which may change especially through and after thinlto. By
+/// pre-computing and assigning as metadata, this mechanism is resilient to such
+/// changes (as well as name changes e.g. suffix ".llvm." additions). It's
+/// arguably a much simpler mechanism than PGO's current GV-based one, and can
+/// be made available more broadly.
----------------
snehasish wrote:
I don't think you need to make a case for the guid computation in the comments here. I suggest dropping the contents from "It's arguably .....". The comment will be stale in the future.
https://github.com/llvm/llvm-project/pull/102930
More information about the llvm-commits
mailing list