This patch adds parser support for defaultmap clause [OpenMP 5.0].
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thanks @do for this patch. I have two comments.
- I think the linux CI is failing since the patch is not formatted. Can you run clang-format on the two source files (flang/include/flang/Parser/parse-tree.h, flang/lib/Parser/openmp-parsers.cpp)? Since we build clang also along with flang you likely have clang-format as well in your bin.
./bin/clang-format -i <path-to-filename>
- Can you also add a parse-tree dump test similar to what is in the following file? This is just to check that the parse-tree created is correct and it is easier for the reviewers to see the parse-tree.
https://github.com/llvm/llvm-project/blob/main/flang/test/Parser/omp-sections.f90
flang/lib/Parser/openmp-parsers.cpp | ||
---|---|---|
55–59 | Will do. Thanks. |
flang/test/Parser/omp-defaultmap-unparse.f90 | ||
---|---|---|
36–57 | Nit: For the unparse tests only the relevant section is required. You can remove the checks for the rest from all the tests. !PARSE-TREE: OmpBeginBlockDirective !PARSE-TREE: OmpBlockDirective -> llvm::omp::Directive = target !PARSE-TREE: OmpClauseList -> OmpClause -> Defaultmap -> OmpDefaultmapClause !PARSE-TREE: ImplicitBehavior = Tofrom !PARSE-TREE: VariableCategory = Scalar | |
255–280 | Nit: I think you can move these entries also close to the individual tests. |
flang/test/Parser/omp-defaultmap-unparse.f90 | ||
---|---|---|
43–56 | @do I meant you can remove the check for Block and OmpEndBlockDirective and just have the following. !PARSE-TREE: OmpBeginBlockDirective !PARSE-TREE: OmpBlockDirective -> llvm::omp::Directive = target !PARSE-TREE: OmpClauseList -> OmpClause -> Defaultmap -> OmpDefaultmapClause !PARSE-TREE: ImplicitBehavior = Tofrom !PARSE-TREE: VariableCategory = Scalar |
flang/include/flang/Parser/parse-tree.h | ||
---|---|---|
3346 | This change is missed. |
@do I am trying to land this patch for you as you suggested, but I need your email address to make you the author of this patch. I believe this patch was uploaded via the web interface and so it doesn't have your email address tied to it.
The comment needs changes since you are extending 4.5 to 5.0.