This is an archive of the discontinued LLVM Phabricator instance.

[Flang][OpenMP] Added parser support for device_type clause
ClosedPublic

Authored by TIFitis on Feb 9 2023, 11:32 AM.

Details

Summary

This patch adds parser suppert for the device_type clause used by the Declare Target directive.

Diff Detail

Event Timeline

TIFitis created this revision.Feb 9 2023, 11:32 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald Transcript
TIFitis requested review of this revision.Feb 9 2023, 11:32 AM

I think it would be good if you added a unit test for it. Thanks!

TIFitis updated this revision to Diff 496434.Feb 10 2023, 4:57 AM

Added test for device_type clause.
Added entries for device_type clause in FlangOmpReportVisitor and Unparse.

Could you add minimal unparse and dump-parse-tree tests?
Reference: https://reviews.llvm.org/D138229#change-BaBt6tTyavMa

raghavendhra added inline comments.
llvm/include/llvm/Frontend/OpenMP/OMP.td
1101

As device_type clause is introduced from OpenMP 5.0, can you please change this to <OMPC_DeviceType, 50> instead?

TIFitis updated this revision to Diff 496987.Feb 13 2023, 7:46 AM
TIFitis marked an inline comment as done.

Added test for unparse and dump-parse-tree. Addressed reviewer comments.

LG. Please wait for @raghavendhra.

This revision is now accepted and ready to land.Feb 15 2023, 5:28 AM
raghavendhra accepted this revision.Feb 15 2023, 2:04 PM

LGTM

Thanks!