This is an archive of the discontinued LLVM Phabricator instance.

ELF: Reduce the size of InputSectionBase by two words. NFCI.
ClosedPublic

Authored by pcc on Mar 6 2019, 1:24 PM.

Details

Summary
  • The Assigned bit was previously taking a word on its own. Move it into the bit fields in SectionBase.
  • NumRelocations and AreRelocsRela were previously also taking up a word despite only using half of it. Move them into the alignment gap after SectionBase's fields.

Diff Detail

Repository
rL LLVM

Event Timeline

pcc created this revision.Mar 6 2019, 1:24 PM
Herald added a project: Restricted Project. · View Herald Transcript
grimar accepted this revision.Mar 7 2019, 12:35 AM
grimar added a subscriber: grimar.

LGTM

This revision is now accepted and ready to land.Mar 7 2019, 12:35 AM
This revision was automatically updated to reflect the committed changes.
ruiu added a comment.Mar 11 2019, 4:15 PM

LGTM

I think the size of InputSection is too critical as the number of instances of that class is not that large compared to other stuff, e.g. relocations or mergeable strings. But still, smaller is better!