[llvm] r231214 - Revert "[ADT] fail-fast iterators for DenseMap"

Zachary Turner zturner at google.com
Fri Mar 6 12:57:24 PST 2015


Didn't +David Majnemer <majnemer at google.com> have an idea surrounding
pointer unions?  I'm not sure if he mentioned it on this thread or whether
it would work, but I +'ed him so maybe he can chime in.

On Fri, Mar 6, 2015 at 12:56 PM Sanjoy Das <sanjoy at playingwithpointers.com>
wrote:

> > It has more impact than that though. It also means we need 3x the
> registers,
> > 3x the function arguments, etc etc. I think this is a pretty high cost to
> > pay.
>
> The register usage I'm not too worried about since we won't actually
> be using the epoch values (so the regalloc should not be putting them
> inside registers at all in most cases); but I see how it can affect
> function arguments.
>
> Btw, Chandler, I thought about your idea of using template
> specialization to make a epoch-enabled DenseMap a different type from
> an epoch-disabled DenseMap (safety from symbol mangling).  If mixing
> defined(NDEBUG) headers and !defined(NDEBUG) libs (or vice versa) is a
> supported use case, we'll still run into trouble with data structures
> that embed DenseMaps.  For instance, in debug mode, LoopInfo will
> embed a epoch-enabled DenseMap while in release mode it will embed a
> epoch-disabled DenseMap and we'll have the same ABI compatibility
> problem there.
>
> -- Sanjoy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150306/2aa1717a/attachment.html>


More information about the llvm-commits mailing list