[PATCH] D112679: Make the BBAddrMap struct binary-format-agnostic.

Han Shen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 28 14:18:40 PDT 2021


shenhan added a comment.

In D112679#3094869 <https://reviews.llvm.org/D112679#3094869>, @rahmanl wrote:

> In D112679#3094847 <https://reviews.llvm.org/D112679#3094847>, @shenhan wrote:
>
>> One question, is "BBAddrMap" (or "ELF_BBAddrMap" in the origin code) only used to carry return values? You mentioned the section size won't change (for both ELF32 and ELF64), is it because you do not use this structure for writing out to ELF section?
>
> Correct. `BBAddrMap` is only used in the return type for `decodeBBAddrMap`. This is completely independent from how the entries are written out to the ELF section.

I see. Thanks. This change seems reasonable to me, given that the object sizes do not increase, the consumer of bbaddrmap usually do not care the mere increase in size and ease of use of  the library function (without templated data structures) is more important.

LGTM


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112679/new/

https://reviews.llvm.org/D112679



More information about the llvm-commits mailing list