llvm/flang/lib/parser
Jinxin (Brian) Yang 5330ebbc4a [flang] [OpenMP] Canonicalization framework (flang-compiler/f18#599)
* [OpenMP] Canonicalization framework

This is mainly designed for loop association work but can be used for others,
and `CanonicalizeOmp` must be after `CanonicalizeDo`.

At the `Block` level, recognize legal sequence of `OpenMPLoopConstruct`,
`DoConstruct`, and `OmpEndLoopDirective`. Move available `DoConstruct`
and optional `OmpEndLoopDirective` into `OpenMPLoopConstruct`. Throw error
messages if:
 1. `DoConstruct` is not following `OpenMPLoopConstruct`
 2. `OmpEndLoopDirective` is not following associated do-loop

Once this pass this done, Semantics will not proceed if error exists.

* Update on reviews

1. extract matching and move part into its own function (once `DoConstruct`
   is moved, see whether `OpenMPEndLoopDirective` is available)

2. Use a template function to access construct from ExecutionPartConstruct.

3. Move this code into namespace semantics

Original-commit: flang-compiler/f18@52979f1e93
Reviewed-on: https://github.com/flang-compiler/f18/pull/599
2019-08-22 10:34:15 -07:00
..
basic-parsers.h [flang] Revert "Remove needless braces" 2019-06-26 09:44:08 +00:00
char-block.h [flang] Add operator<< for parser::CharBlock 2019-08-07 10:49:54 -07:00
char-buffer.cc [flang] Changed .clang-format so that it will not add a comment after the closing brace of each namespace. Removed all such previous comments from all .cc and .h files 2018-10-25 05:55:23 -07:00
char-buffer.h [flang] Changed .clang-format so that it will not add a comment after the closing brace of each namespace. Removed all such previous comments from all .cc and .h files 2018-10-25 05:55:23 -07:00
char-set.cc [flang] Changed .clang-format so that it will not add a comment after the closing brace of each namespace. Removed all such previous comments from all .cc and .h files 2018-10-25 05:55:23 -07:00
char-set.h [flang] Extirpate NCHARACTER type, NC"" literals, and EUC-JP Hollerith 2019-06-28 11:22:43 -07:00
characters.cc [flang] Extirpate NCHARACTER type, NC"" literals, and EUC-JP Hollerith 2019-06-28 11:22:43 -07:00
characters.h [flang] Extirpate NCHARACTER type, NC"" literals, and EUC-JP Hollerith 2019-06-28 11:22:43 -07:00
CMakeLists.txt [flang] Generalize tools, clean up common/unwrap.h with new-found knowledge 2019-04-16 15:59:04 -07:00
debug-parser.cc [flang] Replace formatting of CharBlock & string 2019-05-07 09:24:32 -07:00
debug-parser.h [flang] Changed .clang-format so that it will not add a comment after the closing brace of each namespace. Removed all such previous comments from all .cc and .h files 2018-10-25 05:55:23 -07:00
dump-parse-tree.h [flang] [OpenMP] parse tree fix for Declare Target (flang-compiler/f18#670) 2019-08-20 10:23:56 -07:00
features.h [flang] Add non standard feature for labeled do not ending with END DO or CONTINUE 2019-07-09 11:54:40 -07:00
format-specification.h [flang] Redo without macros 2019-04-09 13:29:40 -07:00
grammar.h [flang] [OpenMP] parse tree changes for OpenMPLoopConstruct (flang-compiler/f18#656) 2019-08-14 15:16:27 -07:00
instrumented-parser.cc [flang] Changed .clang-format so that it will not add a comment after the closing brace of each namespace. Removed all such previous comments from all .cc and .h files 2018-10-25 05:55:23 -07:00
instrumented-parser.h [flang] Changed .clang-format so that it will not add a comment after the closing brace of each namespace. Removed all such previous comments from all .cc and .h files 2018-10-25 05:55:23 -07:00
message.cc [flang] Trim duplicate error messages on intrinsics, and fix FINDLOC for Character data. 2019-07-03 12:30:28 -07:00
message.h [flang] Support SELECTED_CHAR_KIND("DEFAULT") 2019-07-17 15:58:28 -07:00
openmp-grammar.h [flang] [OpenMP] miscellaneous parse tree fix (flang-compiler/f18#669) 2019-08-20 10:30:29 -07:00
parse-state.h [flang] Character set and encoding changes 2019-06-17 16:13:07 -07:00
parse-tree-visitor.h [flang] [OpenMP] parse tree fix for Declare Target (flang-compiler/f18#670) 2019-08-20 10:23:56 -07:00
parse-tree.cc [flang] Add operator<< for parser::CharBlock 2019-08-07 10:49:54 -07:00
parse-tree.h [flang] [OpenMP] parse tree fix for Declare Target (flang-compiler/f18#670) 2019-08-20 10:23:56 -07:00
parsing.cc [flang] Character set and encoding changes 2019-06-17 16:13:07 -07:00
parsing.h [flang] Character set and encoding changes 2019-06-17 16:13:07 -07:00
preprocessor.cc [flang] Enable some new warnings, clean up some of their consequences 2019-08-16 09:41:06 -07:00
preprocessor.h [flang] Changed .clang-format so that it will not add a comment after the closing brace of each namespace. Removed all such previous comments from all .cc and .h files 2018-10-25 05:55:23 -07:00
prescan.cc [flang] Review comments and last (?) bugs 2019-06-18 13:46:54 -07:00
prescan.h [flang] Review comments and last (?) bugs 2019-06-18 13:46:54 -07:00
provenance.cc [flang] Enable more warnings, deal with fallout 2019-08-16 09:41:07 -07:00
provenance.h [flang] Enable more warnings, deal with fallout 2019-08-16 09:41:07 -07:00
source.cc [flang] Character set and encoding changes 2019-06-17 16:13:07 -07:00
source.h [flang] Character set and encoding changes 2019-06-17 16:13:07 -07:00
stmt-parser.h [flang] [OpenMP] parse tree changes for Sections/Parallel Sections constructs (flang-compiler/f18#652) 2019-08-14 08:42:28 -07:00
token-parsers.h [flang] Define and use OpenMPConstructDirective 2019-07-15 13:05:24 -07:00
token-sequence.cc [flang] Extirpate NCHARACTER type, NC"" literals, and EUC-JP Hollerith 2019-06-28 11:22:43 -07:00
token-sequence.h [flang] More debugging vs. regression tests 2019-06-17 16:13:08 -07:00
tools.cc [flang] Enable more warnings, deal with fallout 2019-08-16 09:41:07 -07:00
tools.h [flang] Allocate semantic checks (second part) 2019-05-03 00:45:22 -07:00
type-parsers.h [flang] [OpenMP] parse tree changes for OpenMPLoopConstruct (flang-compiler/f18#656) 2019-08-14 15:16:27 -07:00
unparse.cc [flang] [OpenMP] Canonicalization framework (flang-compiler/f18#599) 2019-08-22 10:34:15 -07:00
unparse.h [flang] More debugging vs. regression tests 2019-06-17 16:13:08 -07:00
user-state.cc [flang] Use value()/has_value() on Indirection class templates instead of operator*/operator-> 2019-03-05 12:28:08 -08:00
user-state.h [flang] Changed .clang-format so that it will not add a comment after the closing brace of each namespace. Removed all such previous comments from all .cc and .h files 2018-10-25 05:55:23 -07:00