This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Add ISD::EH_DWARF_CFA
ClosedPublic

Authored by sunshaoce on May 22 2022, 8:51 PM.

Details

Summary

Based on D24038.
LLVM has an @llvm.eh.dwarf.cfa intrinsic, used to lower the GCC-compatible __builtin_dwarf_cfa() builtin.

Diff Detail

Event Timeline

sunshaoce created this revision.May 22 2022, 8:51 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 22 2022, 8:51 PM
sunshaoce requested review of this revision.May 22 2022, 8:51 PM
StephenFan added inline comments.May 22 2022, 10:35 PM
llvm/test/CodeGen/RISCV/eh-dwarf-cfa.ll
39

Inconsistent between comment and real code about nounwind attribute.

sunshaoce marked an inline comment as done.

Address comments.

StephenFan added inline comments.May 23 2022, 12:10 AM
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
192

Would it be better to only lower i64 EH_DWARF_CFA in RV64? Because the result operand of EH_DWARF_CFA is pointer type and we can't represent an i64 pointer type in RV32.

sunshaoce updated this revision to Diff 431299.May 23 2022, 1:11 AM
sunshaoce marked an inline comment as done.

Address @StephenFan's comments.

luismarques added inline comments.May 26 2022, 4:09 AM
llvm/test/CodeGen/RISCV/eh-dwarf-cfa.ll
5

Nit: demangle the function names, to make the test more human-readable.

37

Remove the comment

sunshaoce marked 2 inline comments as done.

Address @luismarques's comments.

StephenFan accepted this revision.Jun 8 2022, 1:38 AM
This revision is now accepted and ready to land.Jun 8 2022, 1:38 AM
This revision was landed with ongoing or failed builds.Jun 8 2022, 7:03 AM
This revision was automatically updated to reflect the committed changes.