[PATCH] D63466: [Remarks] Add an LLVM-bitstream-based remark serializer
Francis Visoiu Mistrih via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 17 18:20:44 PDT 2019
thegameg created this revision.
thegameg added reviewers: paquette, anemet, JDevlieghere, hfinkel.
Herald added subscribers: hiraditya, mgorny.
Herald added a project: LLVM.
Add a new serializer, using a binary format based on the LLVM bitstream format.
This format provides a way to serialize the remarks in two modes:
1. Separate mode: the metadata is separate from the remark entries.
2. Standalone mode: the metadata and the remark entries are in the same file.
The format contains:
- a meta block: container version, container type, string table, external file path, remark version
- a remark block: type, remark name, pass name, function name, debug file, debug line, debug column, hotness, arguments (key, value, debug file, debug line, debug column)
A string table is required for this format, which will be dumped in the meta block to be consumed before parsing the remark blocks.
On clang itself, we noticed a size reduction of 13.4x compared to YAML, and a compile-time reduction of between 1.7% and 3.5% on CTMark.
https://reviews.llvm.org/D63466
Files:
llvm/include/llvm/IR/RemarkStreamer.h
llvm/include/llvm/Remarks/BitstreamRemarkContainer.h
llvm/include/llvm/Remarks/BitstreamRemarkSerializer.h
llvm/include/llvm/Remarks/Remark.h
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/lib/IR/RemarkStreamer.cpp
llvm/lib/Remarks/BitstreamRemarkSerializer.cpp
llvm/lib/Remarks/CMakeLists.txt
llvm/test/CodeGen/X86/remarks-bitstream.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63466.205228.patch
Type: text/x-patch
Size: 29220 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190618/59de1696/attachment.bin>
More information about the llvm-commits
mailing list