[all-commits] [llvm/llvm-project] 41f8b8: [MCAsmInfo] Support UsesCFIForDebug for targets wi...

RamNalamothu via All-commits all-commits at lists.llvm.org
Wed May 5 16:24:21 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 41f8b8e8075bfb80037390ff033558565f656007
      https://github.com/llvm/llvm-project/commit/41f8b8e8075bfb80037390ff033558565f656007
  Author: RamNalamothu <VenkataRamanaiah.Nalamothu at amd.com>
  Date:   2021-05-06 (Thu, 06 May 2021)

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

  Log Message:
  -----------
  [MCAsmInfo] Support UsesCFIForDebug for targets with no exception handling

This change enables emitting CFI unwind information for debugging purpose
for targets with MCAsmInfo::ExceptionsType == ExceptionHandling::None.

Currently generating CFI unwind information is entangled with supporting
the exceptions, even when AsmPrinter explicitly recognizes that the unwind
tables are being generated as debug information.

In fact, the unwind information is not generated even if we specify
--force-dwarf-frame-section, unless exceptions are enabled. The LIT test
llvm/test/CodeGen/AMDGPU/debug_frame.ll demonstrates this behavior.

Enable this option for AMDGPU to prepare for future patches which add
complete CFI support.

Reviewed By: dblaikie, MaskRay

Differential Revision: https://reviews.llvm.org/D78778




More information about the All-commits mailing list