[llvm] Implements PGOBBAddrMap in Object and ObjectYAML with tests [1/5] (PR #71750)

Rahman Lavaee via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 28 13:42:44 PST 2023


================
@@ -706,10 +718,21 @@ ELFFile<ELFT>::decodeBBAddrMap(const Elf_Shdr &Sec,
       if (Version > 2)
         return createError("unsupported SHT_LLVM_BB_ADDR_MAP version: " +
                            Twine(static_cast<int>(Version)));
-      Data.getU8(Cur); // Feature byte
+      Feature = Data.getU8(Cur); // Feature byte
+      FuncEntryCountEnabled =
----------------
rlavaee wrote:

How about defining a bit-field struct for these (similar to `BBEntry::Metadata`) and implement encode and decode there?

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


More information about the llvm-commits mailing list