[llvm] Adding Matching and Inference Functionality to Propeller-PR3: Read basic block hashes from propeller profile. (PR #164223)
Rahman Lavaee via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 27 10:04:58 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");
----------------
rlavaee wrote:
Maybe we don't need to print 0x at all and assume that the hash is always hexadecimal.
https://github.com/llvm/llvm-project/pull/164223
More information about the llvm-commits
mailing list