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

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Fri May 13 13:31:16 PDT 2016


It is possible to do it faster if the miss rate is high, and the hash
function is expensive.
Otherwise, it's not.



On Wed, May 11, 2016 at 1:39 PM, Rui Ueyama via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> 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
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160513/8f338f1f/attachment.html>


More information about the llvm-commits mailing list