Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flang] [OpenMP] parse tree changes for
OpenMPBlockConstruct
(flang…
…-compiler/f18#632) * [OpenMP] parse tree changes for `OpenMPBlockConstruct` 1. merge `Workshare` and `Single` into `OpenMPBlockConstruct` because they both accept structured-block and syntax is similar to other block directives. 2. `OpenMPBlockConstruct` changes to structure like `{Begin, Block, End}`, where `Begin` and `End` are tuple of `{Directive, ClauseList}`. 3. Updated the check-omp-structure.* for necessary parts. Added all the END directive enumeration types that may have clauses. More tests will be added during Semantics. * [OpenMP] Update on Tim's suggestion 1. Fix unspecified enumeration for `OmpDirective` in the `OmpContext`. This is through getting rid of `PushContext(source)` function to make sure whenever it is about to push a NEW context, directive source location and enumeration are available. To do that, I moved around all the switches for directive into high level `Construct`'s `Enter` node. Besides fixing the issue, the side benefit is that whenever we call `GetContext().directive`, we are sure that the `directive` here was set already. 2. When `Enter` the `OmpEndBlockDirective` node, partial context information, such as directive source location or legal clause lists, needs to be reset. The new directive source location should be `OmpEndBlockDirective`'s `source`. The enumeration `directive` should not be reset for the END directives that do not accept clauses because nothing needs to be checked (for example any clause that is on `END PARALLEL` is illegal). Original-commit: flang-compiler/f18@e5bd6b7 Reviewed-on: flang-compiler/f18#632
- Loading branch information
Showing
7 changed files
with
246 additions
and
275 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.