This is an archive of the discontinued LLVM Phabricator instance.

[OpenCL] Always add nounwind attribute for OpenCL
ClosedPublic

Authored by svenvh on Jan 18 2023, 8:51 AM.

Details

Summary

Neither OpenCL nor C++ for OpenCL support exceptions, so add the
nounwind attribute unconditionally for those languages.

Unblocks D138958.

Diff Detail

Event Timeline

svenvh created this revision.Jan 18 2023, 8:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 18 2023, 8:51 AM
svenvh requested review of this revision.Jan 18 2023, 8:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 18 2023, 8:51 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
bader accepted this revision.Jan 18 2023, 9:27 AM

Should we generalize and rename clang/test/CodeGenOpenCL/convergent.cl to validate function attributes other than convergent? It's not obvious that presence of nounwind attribute is validated by clang/test/CodeGenOpenCL/convergent.cl.

This revision is now accepted and ready to land.Jan 18 2023, 9:27 AM

Should we generalize and rename clang/test/CodeGenOpenCL/convergent.cl to validate function attributes other than convergent? It's not obvious that presence of nounwind attribute is validated by clang/test/CodeGenOpenCL/convergent.cl.

I think the main goal of clang/test/CodeGenOpenCL/convergent.cl remains testing convergent, so I'd rather not generalize this particular test. nounwind is somewhat coincidentally tested by various tests now, but we could add a separate test for generic attributes such as nounwind if you think it's worth doing so.

This revision was landed with ongoing or failed builds.Jan 20 2023, 4:06 AM
This revision was automatically updated to reflect the committed changes.