This is an archive of the discontinued LLVM Phabricator instance.

[Flang] Syntax support for OMP Allocators Construct
ClosedPublic

Authored by elmcdonough on May 3 2023, 12:32 AM.

Details

Summary

OpenMP 5.2 introduces a Fortran specific construct that aims to replace the executable allocate directive. This patch seeks to add parser support for the directive as well as the allocator clause with the extended align/complex modifier.

Diff Detail

Event Timeline

elmcdonough created this revision.May 3 2023, 12:32 AM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: mehdi_amini. · View Herald Transcript
elmcdonough requested review of this revision.May 3 2023, 12:32 AM
elmcdonough retitled this revision from Syntax support for OMP Allocators Construct to [Flang] Syntax support for OMP Allocators Construct.May 3 2023, 12:34 AM

I'm currently working on adding the corresponding semantic check, but I wasn't sure if it should be included in this revision.

LG. Minor Nit comments inline.

I'm currently working on adding the corresponding semantic check, but I wasn't sure if it should be included in this revision.

This is fine.

flang/lib/Parser/openmp-parsers.cpp
144

Nit: This does not match what is implemented below. From this syntax it looks like, align can occur only with an allocator.

The reference card says
!$omp allocate (list) [clause[ [,]clause] ... ]
clause -> align (alignment) alignment | allocator (allocator)

592

Nit: Might want to say what clause is.

This revision is now accepted and ready to land.May 10 2023, 7:26 AM

Fix documentation

This revision was landed with ongoing or failed builds.May 10 2023, 12:57 PM
This revision was automatically updated to reflect the committed changes.