aprantl added a comment. In https://reviews.llvm.org/D31440#713308, @dblaikie wrote:
> I'm a bit confused - the alloca was only emitted at -O0, by the looks of it. > Presumably it's pessimizing in some way at higher optimization levels? Or is > that not the case? I think it is really working around the odd behavior of LLVM here. What gives it away is the we key the addition of the extra DW_OP_deref on whether it is an alloca or not. But note that this is not how dbg.declare works: dbg.declare(%alloca, !DIExpression()) is (kind of) equivalent to dbg.value(%alloca, !DIExpression(DW_OP_deref)). So we are using the presence of the alloca as a proxy for how the backend happens to compile the DwarfExpression here and work around its idiosyncrasy by emitting an extra DW_OP_deref. > Also, it looks like this change lost the "if > gmlt" test, so might cause > variable declarations (& thus types) to leak into GMLT, which is undesirable. Oh.. that was unintentional collateral damage. Thanks for noticing! https://reviews.llvm.org/D31440 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits