diff options
author | Zachary Turner <zturner@google.com> | 2017-08-21 20:17:19 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-08-21 20:17:19 +0000 |
commit | 5641c07d6b99deebc2bec1d1d2d20db2646de827 (patch) | |
tree | 26397f4b593c64f01bcf842d6114be1df8891f28 /llvm/lib/DebugInfo/CodeView/SymbolSerializer.cpp | |
parent | fb0994b37e1b008b93a502977bbe10a57a65278e (diff) | |
download | bcm5719-llvm-5641c07d6b99deebc2bec1d1d2d20db2646de827.tar.gz bcm5719-llvm-5641c07d6b99deebc2bec1d1d2d20db2646de827.zip |
[PDB] Serialize records into a stack-allocated buffer.
We were using a std::vector<> and resizing to MaxRecordLength,
which is ~64KB. We would then do this repeatedly often many
times in a tight loop, which was causing measurable performance
impact when linking PDBs.
Patch by Alex Telishev
Differential Revision: https://reviews.llvm.org/D36940
llvm-svn: 311375
Diffstat (limited to 'llvm/lib/DebugInfo/CodeView/SymbolSerializer.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/CodeView/SymbolSerializer.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/DebugInfo/CodeView/SymbolSerializer.cpp b/llvm/lib/DebugInfo/CodeView/SymbolSerializer.cpp index 9a2e776feb7..0071ecc8568 100644 --- a/llvm/lib/DebugInfo/CodeView/SymbolSerializer.cpp +++ b/llvm/lib/DebugInfo/CodeView/SymbolSerializer.cpp @@ -21,8 +21,7 @@ using namespace llvm::codeview; SymbolSerializer::SymbolSerializer(BumpPtrAllocator &Allocator, CodeViewContainer Container) - : Storage(Allocator), RecordBuffer(MaxRecordLength), - Stream(RecordBuffer, support::little), Writer(Stream), + : Storage(Allocator), Stream(RecordBuffer, support::little), Writer(Stream), Mapping(Writer, Container) {} Error SymbolSerializer::visitSymbolBegin(CVSymbol &Record) { |