[PATCH] D20122: [codeview] Add type stream merging prototype
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Tue May 10 11:26:50 PDT 2016
rnk created this revision.
rnk added reviewers: zturner, ruiu.
rnk added a subscriber: llvm-commits.
This code is intended to be used as part of LLD's PDB writing. Until
that exists, this is exposed via llvm-readobj for testing purposes.
The .cpp file implementing the core merging algorithm only weighs in at
~400 lines of code.
Type stream merging uses the following algorithm:
- Begin with a new empty stream, and a new empty hash table that maps
from type record contents to new type index.
- For each new type stream, maintain a map from source type index to
destination type index.
- For each record, copy it and rewrite its type indices to be valid in
the destination type stream.
- If the new type record is not already present in the destination
stream hash table, append it to the destination type stream, assign it
the next type index, and update the two hash tables.
- If the type record already exists in the destination stream, discard
it and update the type index map to forward the source type index to
the existing destination type index.
http://reviews.llvm.org/D20122
Files:
include/llvm/DebugInfo/CodeView/CVLeafTypes.def
include/llvm/DebugInfo/CodeView/CVTypeVisitor.h
include/llvm/DebugInfo/CodeView/MemoryTypeTableBuilder.h
include/llvm/DebugInfo/CodeView/RecordIterator.h
include/llvm/DebugInfo/CodeView/TypeStream.h
include/llvm/DebugInfo/CodeView/TypeStreamMerger.h
include/llvm/DebugInfo/CodeView/TypeTableBuilder.h
lib/DebugInfo/CodeView/CMakeLists.txt
lib/DebugInfo/CodeView/TypeDumper.cpp
lib/DebugInfo/CodeView/TypeStreamMerger.cpp
test/DebugInfo/PDB/pdbdump-headers.test
test/tools/llvm-readobj/Inputs/codeview-merging-1.obj
test/tools/llvm-readobj/Inputs/codeview-merging-2.obj
test/tools/llvm-readobj/codeview-merging.test
tools/llvm-readobj/CMakeLists.txt
tools/llvm-readobj/COFFDumper.cpp
tools/llvm-readobj/ObjDumper.h
tools/llvm-readobj/llvm-readobj.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20122.56768.patch
Type: text/x-patch
Size: 31347 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160510/a253df6e/attachment.bin>
More information about the llvm-commits
mailing list