[llvm] Adding Matching and Inference Functionality to Propeller-PR3: Read basic block hashes from propeller profile. (PR #164223)

via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 30 09:00:13 PDT 2025


================
@@ -287,6 +287,24 @@ Error BasicBlockSectionsProfileReader::ReadV1Profile() {
       }
       continue;
     }
+    case 'h': { // Basic block hash secifier.
+      // Skip the profile when the profile iterator (FI) refers to the
+      // past-the-end element.
+      if (FI == ProgramPathAndClusterInfo.end())
+        continue;
+      for (auto BBIDHashStr : Values) {
+        auto [BBIDStr, HashStr] = BBIDHashStr.split(':');
+        unsigned long long BBID = 0, Hash = 0;
+        if (getAsUnsignedInteger(BBIDStr, 10, BBID))
+          return createProfileParseError(Twine("unsigned integer expected: '") +
+                                         BBIDStr + "'");
+        if (getAsUnsignedInteger(HashStr, 16, Hash))
+          return createProfileParseError(Twine("unsigned integer expected: '") +
----------------
wdx727 wrote:

Done.

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


More information about the llvm-commits mailing list