This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] Emit a 1-byte value as a terminator of entries list in the name index.
ClosedPublic

Authored by ikudrin on Sep 1 2020, 3:52 AM.

Details

Summary

The termination entry of the list has the abbreviation code of 0, and one byte is enough to store that. The patch saves approximately 3 bytes per name in the name index table (the calculation is not exact because there is an alignment operator after the entry pool).

Diff Detail

Event Timeline

ikudrin created this revision.Sep 1 2020, 3:52 AM
ikudrin requested review of this revision.Sep 1 2020, 3:52 AM
dblaikie accepted this revision.EditedSep 1 2020, 8:35 PM

Looks good - thanks!

(for the record, the wording for this is on page 142 of the DWARFv5 spec:

The last entry for each name is followed by a zero byte that terminates the list. There may be gaps between the lists.

This revision is now accepted and ready to land.Sep 1 2020, 8:35 PM

Thanks! I'll add the extract to the description. It sometimes so frustrating that the Standard describes the format in several places. The wording in 6.1.1.4.8, where the Entry Pool is described, is a bit vaguer.