[PATCH] D78778: [AsmPrinter] Fix emitting CFI for debug when exceptions are not supported

Venkata Ramanaiah Nalamothu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 5 07:34:15 PDT 2021


RamNalamothu updated this revision to Diff 343045.
RamNalamothu added a comment.

In D78778#2729953 <https://reviews.llvm.org/D78778#2729953>, @aheejin wrote:

> In D78778#2727655 <https://reviews.llvm.org/D78778#2727655>, @RamNalamothu wrote:
>
>> In D78778#2720397 <https://reviews.llvm.org/D78778#2720397>, @dblaikie wrote:
>>
>>> In D78778#2719704 <https://reviews.llvm.org/D78778#2719704>, @RamNalamothu wrote:
>>>
>>>> Fix couple of WebAsembly debug info LIT tests, as we now emit .debug_frame when no exceptions.
>>>
>>> Hmm - was this intended to change the behavior of WebAssembly? Could you get someone with some WebAssembly context to double check this is desirable behavior?
>>
>> Not intended but probably the LIT test updates are expected for WebAssembly. Adding @aheejin as well to review those.
>> Please note that those LIT tests are not explicitly checking for either presence/non-presense of `.eh_frame` or `.debug_frame` and might have just tried to match the compiler output back then.
>>
>> However, while I still feel the current `usesCFIForDebug()` approach is in the right direction, please let me know if the preferred approach is a target configurable option and if yes, I can update this review with https://reviews.llvm.org/D101592 changes (not meant to be reviewed there).
>
> I am not very familiar with these tests. Perhaps any of @aardappel @sbc100 @yurydelendik would know.

I went ahead and updated the diff with the changes from https://reviews.llvm.org/D101592 i.e. make the `UsesCFIForDebug` option target configurable so that this review can be closed sooner and enable making progress on the rest of the patches in the series.
And later if all targets want to emit `.debug_frame`, by default, when exceptions are not supported, things can be changed accordingly then.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78778

Files:
  llvm/include/llvm/CodeGen/AsmPrinter.h
  llvm/include/llvm/MC/MCAsmInfo.h
  llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
  llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCAsmInfo.cpp
  llvm/test/CodeGen/AMDGPU/debug_frame.ll
  llvm/test/CodeGen/AMDGPU/ptr-arg-dbg-value.ll
  llvm/test/CodeGen/AMDGPU/split-arg-dbg-value.ll
  llvm/test/DebugInfo/AMDGPU/cfi.ll
  llvm/test/MC/ELF/AMDGPU/cfi.s
  llvm/test/MC/ELF/AMDGPU/lit.local.cfg

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78778.343045.patch
Type: text/x-patch
Size: 16975 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210505/79f28390/attachment-0001.bin>


More information about the llvm-commits mailing list