This is an archive of the discontinued LLVM Phabricator instance.

clang/OpenCL: Fix not setting convergent on block invoke kernels
ClosedPublic

Authored by arsenm on Jan 10 2023, 5:09 PM.

Details

Summary

Yet another example how convergent not being the default is dangerous
and backwards.

Diff Detail

Event Timeline

arsenm created this revision.Jan 10 2023, 5:09 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 10 2023, 5:09 PM
arsenm requested review of this revision.Jan 10 2023, 5:09 PM
yaxunl added inline comments.Jan 10 2023, 7:35 PM
clang/lib/CodeGen/TargetInfo.cpp
12428

How about using CGF.CGM.addDefaultFunctionDefinitionAttributes? same as below

Anastasia added inline comments.Jan 11 2023, 4:42 AM
clang/lib/CodeGen/TargetInfo.cpp
12426

If ConstructDefaultFnAttrList was used it would get convergent correctly... Should we be using the helper function here instead?

arsenm added inline comments.Jan 11 2023, 8:37 AM
clang/lib/CodeGen/TargetInfo.cpp
12428

That's what the fixme is for. I wanted to do this as 2 steps because first it explicitly shows the convergent problem more clearly

yaxunl accepted this revision.Jan 30 2023, 6:09 AM

LGTM. Thanks

This revision is now accepted and ready to land.Jan 30 2023, 6:09 AM