added parser support for the unroll construct
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
There is a clang-format issue with flang/lib/Parser/openmp-parsers.cpp and flang/lib/Parser/unparse.cpp.
You have missed support for the full and partial clauses. For adding support, you will have to make some changes to parse these clauses in flang/lib/Parser/openmp-parsers.cpp and llvm/include/llvm/Frontend/OpenMP/OMP.td.
Please also add tests with these clauses.
flang/test/Parser/omp-unroll.f90 | ||
---|---|---|
7 | Nit: y is unused. | |
13 | Nit: no need for semicolon | |
15 | Nit: no need for semicolon |
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
flang/lib/Parser/openmp-parsers.cpp | ||
---|---|---|
298 | Nit: accidental change? | |
flang/test/Parser/omp-unroll.f90 | ||
9 | Nit: check for the partial unroll value as well. | |
llvm/include/llvm/Frontend/OpenMP/OMP.td | ||
80 | 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. |
LGTM. Thanks for your patience. Please update the expectation in the test for the CI and tests to pass before submitting.
flang/test/Parser/omp-unroll.f90 | ||
---|---|---|
22 | The expected value here needs an update. |
I think scalarIntConstantExpr is the correct one to use here.