This is an archive of the discontinued LLVM Phabricator instance.

[SanitizerBinaryMetadata] Optimize used space for features and UAR stack args
ClosedPublic

Authored by melver on Feb 7 2023, 2:10 AM.

Details

Summary

Optimize the encoding of "covered" metadata by:

  1. Reducing feature mask from 4 bytes to 1 byte (needs increase once we reach more than 8 features).
  2. Only emitting UAR stack args size if it is non-zero, saving 4 bytes in the common case.

One caveat is that the emitted metadata for function PC (offset), size,
and UAR size (if enabled) are no longer aligned to 4 bytes.

SanitizerBinaryMetadata version base is increased to 2, since the change
is backwards incompatible.

Diff Detail

Event Timeline

melver created this revision.Feb 7 2023, 2:10 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 7 2023, 2:10 AM
melver requested review of this revision.Feb 7 2023, 2:10 AM
Herald added projects: Restricted Project, Restricted Project, Restricted Project. · View Herald TranscriptFeb 7 2023, 2:10 AM
Herald added subscribers: llvm-commits, Restricted Project, cfe-commits. · View Herald Transcript
dvyukov accepted this revision.Feb 8 2023, 2:07 AM

Nice!

This revision is now accepted and ready to land.Feb 8 2023, 2:07 AM