[PATCH] D99160: [X86][FastISEL] Support DW_TAG_call_site_parameter with FastISEL

David Blaikie via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 6 10:43:46 PDT 2021


dblaikie added a comment.

In D99160#2670460 <https://reviews.llvm.org/D99160#2670460>, @djtodoro wrote:

> 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).

Does anyone have this example (where DW_OP_entry_value is used at -O0)? It'd be great to look at it & see if it's a case of unnecessarily losing the location, or legitimately losing it and using entry_value for best-effort recovery (& then a question of whether the loss is appropriate at -O0, or if we want to pessimize -O0 further to avoid the loss).

I'd worry about turning on call_sites at -O0 - there'd be a lot more calls (especially for C++ code with lots of implicit operations), but numbers will be needed in any case, so not worth much speculation.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99160/new/

https://reviews.llvm.org/D99160



More information about the cfe-commits mailing list