[llvm] Adding Matching and Inference Functionality to Propeller (PR #160706)
    via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Oct  9 00:31:16 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);
----------------
wdx727 wrote:
It should be noted that using ULEB encoding does not help reduce data size. In fact, a 64-bit hash value consists of 4 hashes at different levels, with each hash value being 16 bits. This structure allows us to perform matching at different levels during the matching process, thereby improving matching accuracy.
If a smaller number of bits is used to represent the hash, the matching accuracy will decrease. Nevertheless, this approach may still be feasible. To determine the extent to which the reduced matching accuracy ultimately affects the inference results, further experiments need to be conducted for evaluation.
https://github.com/llvm/llvm-project/pull/160706
    
    
More information about the llvm-commits
mailing list