vsk added inline comments.
================ Comment at: lib/CodeGen/CodeGenFunction.h:383 + // This stack is used/maintained exclusively by the implicit cast sanitizer. + llvm::SmallVector<const CastExpr *, 8> CastExprStack; + ---------------- lebedev.ri wrote: > vsk wrote: > > lebedev.ri wrote: > > > vsk wrote: > > > > Why not 0 instead of 8, given that in the common case, this stack is > > > > unused? > > > No longer relevant. > > I'm referring to CastExprStack within ScalarExprEmitter, which still > > allocates space for 8 pointers inline. > Ah, you mean in the general case when the sanitizer is disabled? > Yes. It's a relatively minor concern, but clang's stack can get pretty deep inside of CodeGenFunction. At one point we needed to outline code by hand to unbreak the ASan build. Later I think we just increased the stack size rlimit. I don't see a countervailing performance benefit of allocating more space inline, at least not here. Repository: rC Clang https://reviews.llvm.org/D48958 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits