OSDN Git Service

[CodeView] Reserve TypeDatabase records up front.
authorZachary Turner <zturner@google.com>
Fri, 5 May 2017 22:02:37 +0000 (22:02 +0000)
committerZachary Turner <zturner@google.com>
Fri, 5 May 2017 22:02:37 +0000 (22:02 +0000)
commit4a6f9ee16ea9306347f1bf6192be1e65c3bf307f
tree380adc91ad4dacef608c40044235c030db222a80
parent4463e1134837fc60d4e12582111e012a5cbe14db
[CodeView] Reserve TypeDatabase records up front.

Most of the time we know exactly how many type records we
have in a list, and we want to use the visitor to deserialize
them into actual records in a database.  Previously we were
just using push_back() every time without reserving the space
up front in the vector.  This is obviously terrible from a
performance standpoint, and it's not uncommon to have PDB
files with half a million type records, where the performance
degredation was quite noticeable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302302 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/DebugInfo/CodeView/TypeDatabase.h
lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
lib/DebugInfo/CodeView/TypeDatabase.cpp
tools/llvm-pdbdump/Analyze.cpp
tools/llvm-pdbdump/LLVMOutputStyle.cpp
tools/llvm-readobj/COFFDumper.cpp