[PATCH] D33506: Don't keep re-allocating the temp serializer.
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 24 10:03:48 PDT 2017
zturner created this revision.
Previously, every time we wanted to serialize a field list record, we would create a new copy of `FieldListRecordBuilder`, which would in turn create a temporary instance of `TypeSerializer`, which itself had a `std::vector<>` that was about 128K in size. So this 128K allocation was happening every time. We can re-use the same instance over and over, we just have to clear its internal hash table and seen records list between each run. This saves us from the constant re-allocations.
This is worth an ~18.5% speed increase (3.75s -> 3.05s) in my tests.
https://reviews.llvm.org/D33506
Files:
llvm/include/llvm/DebugInfo/CodeView/TypeSerializer.h
llvm/include/llvm/DebugInfo/CodeView/TypeTableBuilder.h
llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
llvm/lib/DebugInfo/CodeView/TypeSerializer.cpp
llvm/lib/DebugInfo/CodeView/TypeStreamMerger.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33506.100122.patch
Type: text/x-patch
Size: 4510 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170524/36497bde/attachment.bin>
More information about the llvm-commits
mailing list