[PATCH] D39857: [AMDGPU] Late parsed / dependent arguments for AMDGPU kernel attributes

Alex Voicu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 20 06:34:54 PST 2017


AlexVlx updated this revision to Diff 123577.
AlexVlx added a comment.

Apologies for the delayed update. The new version tries to deal with two issues:

1. the non-compliant style identified by Aaron in various spots, hopefully this is correct now;
2. there was an issue with the existing logic, which only came up with additional testing:
  - for AMDGPUFlatWorkGroupSizeAttr and AMDGPUWavesPerEU, it is valid for the user to have passed an integer literal for the minimum and a dependent expression for the maximum;
  - in this case, iff the expression for the maximum could not be evaluated in Sema, then a spurious error case would obtain in which the minimum would signalled as greater than the maximum, which would have been pegged at 0;
  - this is fixed by having the maximum be at least equal to the minimum before any attempt of evaluating it is made - iff the actual user passed arguments to the attribute violate its invariants the error is signalled.
  - the relevant changes are on lines 5495 and 5529 in SemaDeclAttr.cpp.


https://reviews.llvm.org/D39857

Files:
  include/clang/Basic/Attr.td
  include/clang/Basic/AttrDocs.td
  lib/CodeGen/TargetInfo.cpp
  lib/Sema/SemaDeclAttr.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39857.123577.patch
Type: text/x-patch
Size: 10996 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171120/179609f1/attachment-0001.bin>


More information about the cfe-commits mailing list