[PATCH] D139206: [lld][NFC] Pack InputChunk / OutputSegment more tightly

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 2 10:18:49 PST 2022


MaskRay added inline comments.


================
Comment at: lld/wasm/InputChunks.h:109
+
+  llvm::Align alignment;
+
----------------
sbc100 wrote:
> Maybe put this below the last i32 member (outSecOff) and before the first packed value (sectionKind)?
> 
> Do we have any tooling for automating this kind of stuff?
> 
Note that the placement may affect performance as well as code size (mostly for x86 when the assembly may switch from 1-byte to 4-byte displacement). I usually benchmark two runs. I know little about wasm, but I think the field is probably not accessed that frequently.

My comment here is a reminder that field reordering should not be done blindly.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139206



More information about the llvm-commits mailing list