This is an archive of the discontinued LLVM Phabricator instance.

[lld][NFC] Pack InputChunk / OutputSegment more tightly
AbandonedPublic

Authored by gchatelet on Dec 2 2022, 8:36 AM.

Details

Reviewers
arichardson
Summary

This is a follow up on D139181.
Packing InputChunks going from 88B to 80B.
Packing OutputSegment going from 112B to 104B.

Diff Detail

Event Timeline

gchatelet created this revision.Dec 2 2022, 8:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 2 2022, 8:36 AM
Herald added subscribers: pmatos, asb, sbc100. · View Herald Transcript
gchatelet requested review of this revision.Dec 2 2022, 8:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 2 2022, 8:37 AM
sbc100 added inline comments.Dec 2 2022, 8:42 AM
lld/wasm/InputChunks.h
109

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?

MaskRay added inline comments.
lld/wasm/InputChunks.h
109

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.

gchatelet abandoned this revision.Dec 19 2022, 5:45 AM