OSDN Git Service

Don't do a full scan of the type stream before processing records.
authorZachary Turner <zturner@google.com>
Wed, 24 May 2017 00:26:27 +0000 (00:26 +0000)
committerZachary Turner <zturner@google.com>
Wed, 24 May 2017 00:26:27 +0000 (00:26 +0000)
commitd448c732cb50091866bfa1e08aaa0a59f3c03188
treed466d43875a4d0e66e9724e8fee0868baee5b97b
parent587030b4f5da6ec3dfbc921723ece7ed46a3adfb
Don't do a full scan of the type stream before processing records.

LazyRandomTypeCollection is designed for random access, and in
order to provide this it lazily indexes ranges of types.  In the
case of types from an object file, there is no partial index
to build off of, so it has to index the full stream up front.
However, merging types only requires sequential access, and when
that is needed, this extra work is simply wasted.  Changing the
algorithm to work on sequential arrays of types rather than
random access type collections eliminates this up front scan.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303707 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/DebugInfo/CodeView/TypeStreamMerger.h
lib/DebugInfo/CodeView/TypeStreamMerger.cpp