[PATCH] D141620: clang/OpenCL: Make enqueued blocks inherit the parent attributes

Matt Arsenault via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 12 08:52:34 PST 2023


arsenm created this revision.
arsenm added reviewers: Anastasia, yaxunl.
Herald added subscribers: kosarev, jdoerfert, kerbowa, jvesely.
Herald added a project: All.
arsenm requested review of this revision.
Herald added a subscriber: wdng.

This was missing important environment context, like denormal-fp-math
and target-features. Curiously this seems to be losing nounwind.

      

Note this only fixes the actual invoke kernel. The invoke function is
already setting the default attribute set for internal
functions. However that is still buggy since it's not applying any use
function attributes (it's also missing uniform-work-group-size).

      

I also noticed update_cc_test_checks for attributes seem to not
connect the captured attribute variables to the attributes at the end
(although I think the numbers happen to work out correctly).


https://reviews.llvm.org/D141620

Files:
  clang/lib/CodeGen/TargetInfo.cpp
  clang/test/CodeGenOpenCL/amdgpu-enqueue-kernel.cl
  clang/test/CodeGenOpenCL/cl20-device-side-enqueue-attributes.cl
  clang/test/CodeGenOpenCL/cl20-device-side-enqueue.cl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141620.488674.patch
Type: text/x-patch
Size: 31488 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230112/990952af/attachment-0001.bin>


More information about the cfe-commits mailing list