[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
Tue Oct 28 01:42:32 PDT 2025


================
@@ -287,6 +296,25 @@ Error BasicBlockSectionsProfileReader::ReadV1Profile() {
       }
       continue;
     }
+    case 'h': { // Basic block hash secifier.
+      // Skip the profile when we 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 + "'");
+        HashStr.consume_front("0x");
----------------
wdx727 wrote:

Done.

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


More information about the llvm-commits mailing list