This is an archive of the discontinued LLVM Phabricator instance.

[AsmPrinter][AMDGPU] Generate uwtable entries in .eh_frame
ClosedPublic

Authored by jmmartinez on May 31 2023, 7:47 AM.

Details

Summary

Consider only targets where MCAsmInfo::ExceptionsType == ExceptionHandling::None
and that support CFI (when MCAsmInfo::UsesCFIForDebug is set to true):
currently, only AMDGPU.

This patch enables the emission of CFI information in the .eh_frame
section when the uwtable attribute is present on a function.

Before, we could generate CFI information for debugging puproses only.

This patch prepares AMDGPU to support collecting GPU stack traces in the future.

I did a first implementation (https://reviews.llvm.org/D139024)
but at the time I had not realized that no other platform used
UsesCFIForDebug.

Diff Detail

Event Timeline

jmmartinez created this revision.May 31 2023, 7:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 31 2023, 7:47 AM
jmmartinez requested review of this revision.May 31 2023, 7:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 31 2023, 7:47 AM
scott.linder accepted this revision.May 31 2023, 11:45 AM

LGTM; I always have to re-learn what the combinations of uwtable and nounwind mean, but this seems reasonable to me

This revision is now accepted and ready to land.May 31 2023, 11:45 AM