[PATCH] D138229: [flang][OpenMP] Parser support for the unroll construct (5.1)

Kiran Chandramohan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 23 15:32:51 PST 2022


kiranchandramohan requested changes to this revision.
kiranchandramohan added a comment.
This revision now requires changes to proceed.

Requesting a change in the OMP.td file. Also, there are clang-format issues.

   clang-format
  changed files:
      flang/lib/Parser/openmp-parsers.cpp
      flang/lib/Parser/unparse.cpp



================
Comment at: flang/lib/Parser/openmp-parsers.cpp:277
     "UNIFORM" >> construct<OmpClause>(construct<OmpClause::Uniform>(
-                     parenthesized(nonemptyList(name)))) ||
+                     parenthesized(nonemptyList(name)))) ||                     
     "UNTIED" >> construct<OmpClause>(construct<OmpClause::Untied>()))
----------------
Nit: accidental change?


================
Comment at: flang/test/Parser/omp-unroll.f90:8
+
+!CHECK: !$omp unroll partial
+!$omp  unroll partial(3)
----------------
Nit: check for the partial unroll value as well.


================
Comment at: llvm/include/llvm/Frontend/OpenMP/OMP.td:76
+  let clangClass = "OMPPartialClause";
+  let flangClass = "ScalarIntExpr"; 
+  let isValueOptional = true;
----------------
The standard says that this is a `Compile Time Constant` so i guess `ScalarIntConstantExpr` is the right `flangClass` here.

```
where unroll-factor is a positive integer expression that is a compile-time constant.
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138229



More information about the llvm-commits mailing list