[PATCH] D120147: [memprof] Remove packed qualifier for MemprofRecord::Frame.

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 18 13:51:35 PST 2022


tejohnson accepted this revision.
tejohnson added a comment.

In D120147#3332865 <https://reviews.llvm.org/D120147#3332865>, @snehasish wrote:

> In D120147#3332688 <https://reviews.llvm.org/D120147#3332688>, @tejohnson wrote:
>
>> What about the other uses of PACKED e.g. in MemProfData.inc? Should/can they be removed?
>
> This use of packed is for reading and writing of the indexed profile format. The packed structs in MemProfData.inc are written by the runtime and read by the raw memprof profile reader. The use of packed structs makes the compiler generate alignment aware code, simplifying the implementation in the runtime. Here, within llvm, we have access to support::endian so implementing endian and alignment aware serialization/deserialization is simple. We would have to replicate this in the memprof runtime.

Oh ok, that makes sense.

lgtm


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120147



More information about the llvm-commits mailing list