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

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed May 11 13:39:46 PDT 2016


ruiu added a comment.

I think this is going to be used in a speed critical path. I'm wondering if this is the fastest way to merge debug types -- one hash table lookup for each derived type may be a bit slow. But at least I don't come up with a better way, so hash table lookup might be unavoidable.


================
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;
 };
----------------
Why don't you use DenseMap?

================
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
----------------
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?


http://reviews.llvm.org/D20122





More information about the llvm-commits mailing list