This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen] Add "noreturn" attirbute to _Unwind_Resume
ClosedPublic

Authored by ebrevnov on Dec 22 2020, 3:07 AM.

Details

Summary

Currently 'resume' is lowered to _Unwind_Resume with out "noreturn" attribute. Semantically _Unwind_Resume library call is expected to never return and should be marked as such. Though I didn't find any changes in behavior of existing tests there will be a difference once https://reviews.llvm.org/D79485 lands.

I was not able to come up with the test case anything better than just checking for presence of "noreturn" attribute. Please let me know if there is a better way to test the change.

Diff Detail

Event Timeline

ebrevnov created this revision.Dec 22 2020, 3:07 AM
ebrevnov requested review of this revision.Dec 22 2020, 3:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 22 2020, 3:07 AM

Please add a test

ebrevnov updated this revision to Diff 313522.Dec 23 2020, 2:53 AM

Added test case.

ebrevnov edited the summary of this revision. (Show Details)Dec 23 2020, 3:02 AM
ebrevnov added a reviewer: xbolva00.
ebrevnov updated this revision to Diff 313662.Dec 24 2020, 12:12 AM

Updated test case due to https://reviews.llvm.org/D79485 has landed.

xbolva00 accepted this revision.Dec 24 2020, 12:19 AM

noreturn makes sense here

This revision is now accepted and ready to land.Dec 24 2020, 12:19 AM
thakis added a subscriber: thakis.Dec 24 2020, 4:16 AM

Looks like this breaks tests on arm64-apple-macos: http://45.33.8.238/macm1/761/step_10.txt

Please take a look.

Thanks for letting me know. Looking now...

xbolva00 added inline comments.Dec 24 2020, 4:45 AM
llvm/test/CodeGen/Generic/dwarf_eh_resume.ll
1

Linux x86-64 triple to fix test on apple?

Yes. Please review proposed fix https://reviews.llvm.org/D93803. Evgeniy