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

Sanjoy Das sanjoy at playingwithpointers.com
Fri Mar 6 12:55:40 PST 2015

> 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

More information about the llvm-commits mailing list