[llvm-commits] PATCH: add ContextualDenseMap

Nick Lewycky nicholas at mxc.ca
Sun Aug 29 23:48:24 PDT 2010


Ping! I've already ported MergeFunctions to use this, but I'd appreciate 
someone taking a look and making sure that the way I've factored them is 
sane (I did what FoldingSet / ContextualFoldingSet did).

Nick Lewycky wrote:
> This patch adds a new ContextualDenseMap and sinks most of the dense map
> logic into DenseMapImpl. A ContextualDenseMap takes a
> ContextualDenseMapInfo pointer instead of just a typename. I need this
> for mergefuncs where I want a comparison operation that involves target
> data.
>
> The four map info functions (getTombstoneKey, getEmptyKey, getHashValue
> and isEqual) are made virtual in DenseMapImpl and then implemented once
> in DenseMap and again in ContextualDenseMap. This implementation is
> modelled after the relationship between ContextualFoldingSet and
> FoldingSet.
>
> Please review!
>
> Nick
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list