[flang-dev] OpenMP Semantic checks for combined constructs

Stephen Scalpone via flang-dev flang-dev at lists.llvm.org
Wed Nov 27 17:31:07 PST 2019


Hi David,

That’s a good idea.

The code to check intrinsics uses a table to describe the type of the intrinsic, the types of its arguments, the required and optional arguments, overloadings, and aliases between some old and new intrinsics. That table saved a lot of code.

- Steve

From: flang-dev <flang-dev-bounces at lists.llvm.org> on behalf of "Doerfert, Johannes via flang-dev" <flang-dev at lists.llvm.org>
Reply-To: "Doerfert, Johannes" <jdoerfert at anl.gov>
Date: Tuesday, November 26, 2019 at 11:35 AM
To: David Truby <David.Truby at arm.com>, "flang-dev at lists.llvm.org" <flang-dev at lists.llvm.org>
Subject: Re: [flang-dev] OpenMP Semantic checks for combined constructs

Fwiw, I'm in favor.
Generally, i think having a single location that specifies what causes/combinations are allowed is a good idea. I'd even go as far to say we should put this "table" into llvm/lib/frontend/OpenMP with the goal to reuse it in clang later as well. Anything that will help us keep the two in sync is going to be really helpful in the long run.
--
written from my phone

________________________________
From: flang-dev <flang-dev-bounces at lists.llvm.org> on behalf of David Truby via flang-dev <flang-dev at lists.llvm.org>
Sent: Tuesday, November 26, 2019 11:21:15 AM
To: flang-dev at lists.llvm.org <flang-dev at lists.llvm.org>
Subject: [flang-dev] OpenMP Semantic checks for combined constructs

Hi all,

I’ve been looking at the OpenMP semantics checks for combined constructs and I think we need a slight redesign of the OpenMP semantics checks to accommodate these. Currently we’re copying the checks from sub-constructs into the combined constructs, but particularly in the target section of the OpenMP spec there are a huge number of combinations of combined constructs and duplicating all this code seems unwieldy. In addition, if a future version of the OpenMP spec adds for example a new allowed clause for the do directive, currently we will need to update the allowed clauses for do not only in do itself but in every combined construct in which do appears (of which there are a large number).

As such, I propose we restructure the OpenMP semantics checks to include a table of constructs and which clauses are allowed for each, so that this can be indexed not only for each construct itself but also the combined constructs of which it is a member. This will require rewriting most of the semantics checks for OpenMP constructs to use this mechanism, but I think the benefits outweigh the costs of doing this.

Does anyone have any input on this?

Thanks
David Truby
_______________________________________________
flang-dev mailing list
flang-dev at lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/flang-dev/attachments/20191128/a33f7707/attachment.html>


More information about the flang-dev mailing list