[PATCH] D143484: [SanitizerBinaryMetadata] Emit constants as ULEB128

Marco Elver via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 7 02:11:53 PST 2023


melver created this revision.
melver added a reviewer: dvyukov.
Herald added subscribers: Enna1, pengfei, hiraditya.
Herald added a project: All.
melver requested review of this revision.
Herald added projects: clang, Sanitizers, LLVM.
Herald added subscribers: llvm-commits, Sanitizers, cfe-commits.

Emit all constant integers produced by SanitizerBinaryMetadata as
ULEB128 to further reduce binary space used. Increasing the version is
not necessary given this change depends on (and will land) along with
the bump to v2.

To support this, the !pcsections metadata format is extended to allow
for per-section options, encoded in the first MD operator which must
always be a string and contain the section: "<section>!<options>".

Depends on D143482 <https://reviews.llvm.org/D143482>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D143484

Files:
  clang/test/CodeGen/sanitize-metadata.c
  compiler-rt/test/metadata/common.h
  llvm/docs/PCSectionsMetadata.rst
  llvm/include/llvm/Transforms/Instrumentation/SanitizerBinaryMetadata.h
  llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  llvm/lib/CodeGen/SanitizerBinaryMetadata.cpp
  llvm/lib/Transforms/Instrumentation/SanitizerBinaryMetadata.cpp
  llvm/test/CodeGen/X86/pcsections.ll
  llvm/test/Instrumentation/SanitizerBinaryMetadata/atomics.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143484.495438.patch
Type: text/x-patch
Size: 12451 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230207/e5aa92cb/attachment.bin>


More information about the cfe-commits mailing list