[llvm] Store GUIDs in metadata (PR #133682)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Fri May 16 12:12:54 PDT 2025


================
@@ -67,9 +64,7 @@ class PGOContextualProfile {
 
   bool isInSpecializedModule() const;
 
-  bool isFunctionKnown(const Function &F) const {
-    return getDefinedFunctionGUID(F) != 0;
-  }
+  bool isFunctionKnown(const Function &F) const { return F.getGUID() != 0; }
----------------
teresajohnson wrote:

Looks like getGUID will assert if there is no metadata, so will this function work as intended? Looks like most of the uses are themselves in asserts, but there is one non-assert call.

https://github.com/llvm/llvm-project/pull/133682


More information about the llvm-commits mailing list