[PATCH] D20122: [codeview] Add type stream merging prototype

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Fri May 13 10:46:51 PDT 2016


rnk added a comment.

I have a working patch, but it's much larger now because it uses the high level TypeTableBuilder APIs, and those needed to be fleshed out. I'll see if I can cut it down a bit.


================
Comment at: include/llvm/DebugInfo/CodeView/MemoryTypeTableBuilder.h:62
@@ -62,3 +61,3 @@
   std::vector<std::unique_ptr<Record>> Records;
   std::unordered_map<llvm::StringRef, TypeIndex, RecordHash> HashedRecords;
 };
----------------
ruiu wrote:
> Why don't you use DenseMap?
I didn't write it. I intend to come back here later and make it efficient, once it's correct and we can profile it.

================
Comment at: lib/DebugInfo/CodeView/TypeStreamMerger.cpp:38-39
@@ +37,4 @@
+///
+/// - 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
----------------
ruiu wrote:
> It doesn't look like you are using hash table, but instead you are using vectors to map indices.
> 
> Ah, so the hash table is in MemoryTypeTableBuilder.h?
Yeah, it's part of the implementation of TypeTableBuilder.


http://reviews.llvm.org/D20122





More information about the llvm-commits mailing list