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

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 2 04:31:19 PDT 2021


djtodoro added a comment.

In D99160#2666104 <https://reviews.llvm.org/D99160#2666104>, @alok wrote:

> In D99160#2666068 <https://reviews.llvm.org/D99160#2666068>, @djtodoro wrote:
>
>> In D99160#2666066 <https://reviews.llvm.org/D99160#2666066>, @alok wrote:
>>
>>> In D99160#2665580 <https://reviews.llvm.org/D99160#2665580>, @probinson wrote:
>>>
>>>> FastISel is normally used only at -O0, I wouldn't expect any parameters to be optimized out at -O0.
>>>> The test is running llc with default optimization, which is -O2, and forcing fast-isel; this is not a usual combination and I wouldn't expect us to spend any effort making sure debug info works well with that combination.
>>>>
>>>> If flang is forcing fast-isel even with optimization, that sounds like a problem for flang to solve, not LLVM.
>>>
>>> Thanks for your comments. I am sorry as the earlier used options in test case were more confusing than helpful. I have changed that now.
>>> The updated testcase at "-O0" with FastISel does have optimized out parameter, this is because generation of "DW_OP_GNU_entry_value" is enabled starting from "-O0". This causes llvm to generate it whenever it gets opportunity (more local variables to preserve may be the reason). 
>>> The concern here is only DW_OP_GNU_entry_value is not sufficient and should be supported with "DW_TAG_GNU_call_site_parameter", which I tried in current patch.
>>
>>
>>
>>> "DW_OP_GNU_entry_value" is enabled starting from "-O0".
>>
>> I am wondering if this is true...
>
> You can try with testcase attached with this patch.
>
> bash$ llc -O0 -filetype=obj llvm/test/DebugInfo/X86/callsitepar-fastisel.ll -o callsitepar-fastisel.o
> bash$ llvm-dwarfdump callsitepar-fastisel.o | grep DW_OP_GNU_entry_value
>
>   [0x00000000000000bf, 0x0000000000000101): DW_OP_GNU_entry_value(DW_OP_reg4 RSI))

OK, thanks! We should fix that.


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

https://reviews.llvm.org/D99160



More information about the llvm-commits mailing list