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

Owen Rodley via llvm-commits llvm-commits at lists.llvm.org
Mon May 26 19:47:40 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; }
----------------
orodley wrote:

Good point. I'm not very familiar with this code, but it looks like this effectively only returns false for declarations? Everything else will get a GUID. I've changed to check that directly.

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


More information about the llvm-commits mailing list