This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Allow using integral non-type template parameters
ClosedPublic

Authored by hliao on Feb 25 2019, 7:26 AM.

Details

Summary
  • Allow using integral non-type template parameters in the following attributes

    attribute((amdgpu_flat_work_group_size(<min>, <max>))) attribute((amdgpu_waves_per_eu(<min>[, <max>])))

Diff Detail

Repository
rC Clang

Event Timeline

hliao created this revision.Feb 25 2019, 7:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 25 2019, 7:26 AM
hliao added a comment.Feb 25 2019, 7:30 AM

non-type template parameter is used in these attributes in one of major workload. In addition, it also revises the constexpr support by allowing lvalue. The diagnostic message is refined too by pointing out which parameter violates the requirement of constant integer. Previous tests are revised and more tests are added to cover the cases fixed in this change.

yaxunl accepted this revision.Feb 26 2019, 9:37 AM

LGTM. Thanks!

This revision is now accepted and ready to land.Feb 26 2019, 9:37 AM
This revision was automatically updated to reflect the committed changes.