This is an archive of the discontinued LLVM Phabricator instance.

Compact symbols from 96 to 88 bytes
ClosedPublic

Authored by rafael on Dec 9 2017, 10:07 AM.

Details

Reviewers
pcc
ruiu
Summary

By using an index instead of a pointer for verdef we can put the index next to the alignment field. This uses the otherwise wasted area and reduces the shared symbol size.

By itself the performance change of this is in the noise, but I have a followup patch to remove another 8 bytes that improves performance when combined with this.

Diff Detail

Event Timeline

rafael created this revision.Dec 9 2017, 10:07 AM
grimar added a subscriber: grimar.Dec 11 2017, 4:20 AM
ruiu added inline comments.Dec 11 2017, 8:47 AM
ELF/InputFiles.h
309

If you can trigger this by passing a malformed object file, this should be a fatal() instead of assert().

ELF/SymbolTable.cpp
481

unsigned -> uint32_t for consistency.

ELF/SyntheticSections.cpp
2309

You are using getVerdef only here. I might delete that function and just make the member variable public.

Address review comments.

ruiu accepted this revision.Dec 11 2017, 3:03 PM

LGTM

This revision is now accepted and ready to land.Dec 11 2017, 3:03 PM
espindola closed this revision.Mar 14 2018, 3:15 PM
espindola added a subscriber: espindola.

r320449