aprantl added inline comments.
================ Comment at: lib/CodeGen/CGDebugInfo.h:86 + /// represented by instantiated Metadata nodes. + llvm::SmallDenseMap<QualType, llvm::Metadata *> SizeExprCache; + ---------------- sdesmalen wrote: > aprantl wrote: > > I'm expecting VLA's to not be very common, should we use a regular DenseMap > > instead? > Is that not the argument to use a SmallDenseMap instead? The documentation > for DenseMap says: > "Also, because DenseMap allocates space for a large number of key/value pairs > (it starts with 64 by default), it will waste a lot of space if your keys or > values are large." > > There is no documentation for SmallDenseMap, but the name suggests it would > be optimized for maps with only a few values? I think you're right. This SmallDenseMap is not being allocated on the stack, so it is the right tradeoff here. https://reviews.llvm.org/D41698 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits