This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Annotate features from x work item/group IDs.
ClosedPublic

Authored by arsenm on Jun 8 2017, 11:16 AM.

Details

Summary

This wasn't necessary before since they are always enabled
for kernels, but this is necessary if they need to be
forwarded to a callable function.

Diff Detail

Event Timeline

arsenm created this revision.Jun 8 2017, 11:16 AM
rampitec accepted this revision.Jul 17 2017, 12:10 PM

LGTM, with exception of llvm_unreachable for indirect calls.

lib/Target/AMDGPU/AMDGPUAnnotateKernelFeatures.cpp
221

llvm_unreachable for now.
In general I guess all functions whose address is taken shall get all the attributes. One tricky point is that bitcast of a function type (for example when calling an alias changing FTy) considered to be a taken address, so some simplification and analysis is needed.

This revision is now accepted and ready to land.Jul 17 2017, 12:10 PM
arsenm added inline comments.Jul 17 2017, 12:18 PM
lib/Target/AMDGPU/AMDGPUAnnotateKernelFeatures.cpp
221

We already error on these calls in codegen with a proper error

arsenm closed this revision.Jul 17 2017, 3:37 PM

r308226