[PATCH] D106965: [flang][openacc][NFC] Make self clause value optional in ACC.td and extract the parser

Kiran Chandramohan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 8 05:49:29 PDT 2022


kiranchandramohan accepted this revision.
kiranchandramohan added a comment.
This revision is now accepted and ready to land.

LGTM.



================
Comment at: flang/lib/Lower/OpenACC.cpp:439
+      } else {
+        addSelfAttr = true;
       }
----------------
clementval wrote:
> clementval wrote:
> > kiranchandramohan wrote:
> > > I guess you mean if it is not a logical expression or an object list it is an empty self clause and should be represented by the selfAttr. If so, I think this is not nested correctly.
> > The parser changed a bit so this is normally correct. If the clause is present without value then it's the simple `self`. There are couple of test for this in `acc-parallel.f90` and `acc-parallel-loop.f90`.
> The change is mainly due because of the `isOptional` added in `ACC.td`
Ahh OK. I missed the `AccClause::Self` that is outside and represents the presence of the `self` clause.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106965/new/

https://reviews.llvm.org/D106965



More information about the llvm-commits mailing list