[llvm] Adding Matching and Inference Functionality to Propeller (PR #160706)
Rahman Lavaee via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 9 10:30:13 PDT 2025
================
@@ -1526,6 +1526,11 @@ void ELFState<ELFT>::writeSectionContent(
}
SHeader.sh_size += CBA.writeULEB128(BBE.Size);
SHeader.sh_size += CBA.writeULEB128(BBE.Metadata);
+ if (FeatureOrErr->BBHash || BBE.Hash.has_value()) {
+ auto Hash = BBE.Hash.has_value() ?
+ BBE.Hash.value() : llvm::yaml::Hex64(0);;
+ SHeader.sh_size += CBA.writeULEB128(Hash);
----------------
rlavaee wrote:
If your hashes are always 64-bit, then you don't really need ULEB.
I'd like us to consider the size implications a little bit, since we're planning to include the section in our production binaries. 8 extra bytes per basic block could be a huge overhead (could almost double the total section size).
Do you need the 4 hashes to be separate or can you combine them to form a single hash? If we can combine them, then it's possible to define a more flexible encoding. Every function stores the number of hashing bytes once. Then we read the hash values for the specified number of bytes. Different functions can have varying number of hash bytes. So for larger functions we can utilize more bytes (even more than 8). WDYT?
https://github.com/llvm/llvm-project/pull/160706
More information about the llvm-commits
mailing list