[PATCH] D127581: [ELF] Relax R_RISCV_ALIGN
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 20 00:53:00 PDT 2022
MaskRay added a comment.
In D127581#3595417 <https://reviews.llvm.org/D127581#3595417>, @tschuett wrote:
> In D127581#3595064 <https://reviews.llvm.org/D127581#3595064>, @MaskRay wrote:
>
>> In D127581#3594812 <https://reviews.llvm.org/D127581#3594812>, @tschuett wrote:
>>
>>> Do you really need a plain union? How about a `PointerUnion` or something llvmy `std::variant`?
>>
>> The size is very important for memory usage. 8 or 16 bytes here may cost 1% maximum RSS.
>> Since `PointerUnion` abstraction seems unnecessary, I'd want to avoid it.
>
> I would expect the size of the pointer union to be 8 bytes. My main motivation is that unions are odd.
`PointerUnion` will not increase the size, but the additional abstraction is unnecessary. Both features are used in very specific context and there is no need to worry about misuse (and if there is a misuse, it will fail immediately).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127581/new/
https://reviews.llvm.org/D127581
More information about the llvm-commits
mailing list