djtodoro added a comment. In D99160#2669576 <https://reviews.llvm.org/D99160#2669576>, @dblaikie wrote:
> In D99160#2668977 <https://reviews.llvm.org/D99160#2668977>, @djtodoro wrote: > >> I think that the Debug Entry Values feature should not be enabled by default >> for non optimized code, so the `TargetOptions::ShouldEmitDebugEntryValues()` >> should be patched with checking of optimization level (it should be > 0). > > That's currently intended to be already handled by the frontend, right? > (clang only sets `EnableDebugEntryValues` (which `ShouldEmitDebugEntryValues` > checks (hmm, it checks under 'or', not 'and', so I'm not sure where the "only > above -O0" is implemented, but it is implemented somewhere?) if optimizations > are enabled, yeah?) > > Oh, is entry_values actually not conditionalized? It's only the call_site > support that's currently conditionalized on "above -O0"? Looks like there is no explicit check of optimization level (above "-O0"), neither on frontend nor backend for entry-values generation. I think it is the situation since there should not be any optimization (at least that I am aware of, in the case of C/C++) that would cause the entry-values generation... > Hmm - If that's the case, and we currently have some cases where entry_values > are emitted at -O0, I'm not sure /not/ emitting those is the right call > either. If we believe/have data to show that there are so few useful uses of > entry_value at -O0 that it's not worth the DWARF size growth to put > call_sites in at -O0, then I think it might still be worth leaving the > entry_values in (unless they take up a bunch of extra space) for the cases of > mixed optimization compilation (-O0 some code you're debugging, but building > the rest with optimizations). Yeah... That is valuable example... I am thinking in that direction as well, and I am closer to the enabling it for -O0 case if that is useful (and there is no dramatic cost in terms of DWARF size). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99160/new/ https://reviews.llvm.org/D99160 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits