| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[flang] Update the regression tests to use the new driver when enabled This patch updates most of the remaining regression tests (~400) to use flang-new rather then f18 when FLANG_BUILD_NEW_DRIVER is set. This allows us to share more Flang regression tests between f18 and flang-new. A handful of tests have not been ported yet - these are currently either failing or not supported by the new driver. Summary of changes: * RUN lines in tests are updated to use %flang_fc1 instead of %f18 * option spellings in tests are updated to forms accepted by both f18 and flang-new * variables in Bash scripts are renamed (e.g. F18 --> FLANG_FC1) The updated tests will now be run with the new driver, flang-new, whenever it is enabled (i.e when FLANG_BUILD_NEW_DRIVER is set). Although this patch touches many files, vast majority of the changes are automatic: grep -IEZlr "%f18" flang/test/ | xargs -0 -l sed -i 's/%f18/%flang_fc1/g Differential Revision: https://reviews.llvm.org/D100309 | 5 年前 | |
[flang] Produce proper "preprocessor output" for -E option Rename the current -E option to "-E -Xflang -fno-reformat". Add a new Parsing::EmitPreprocessedSource() routine to convert the cooked character stream output of the prescanner back to something more closely resembling output from a traditional preprocessor; call this new routine when -E appears. The new -E output is suitable for use as fixed form Fortran source to compilation by (one hopes) any Fortran compiler. If the original top-level source file had been free form source, the output will be suitable for use as free form source as well; otherwise there may be diagnostics about missing spaces if they were indeed absent in the original fixed form source. Unless the -P option appears, #line directives are interspersed with the output (but be advised, f18 will ignore these if presented with them in a later compilation). An effort has been made to preserve original alphabetic character case and source indentation. Add -P and -fno-reformat to the new drivers. Tweak test options to avoid confusion with prior -E output; use -fno-reformat where needed, but prefer to keep -E, sometimes in concert with -P, on most, updating expected results accordingly. Differential Revision: https://reviews.llvm.org/D106727 | 4 年前 | |
[flang] Update the regression tests to use the new driver when enabled This patch updates most of the remaining regression tests (~400) to use flang-new rather then f18 when FLANG_BUILD_NEW_DRIVER is set. This allows us to share more Flang regression tests between f18 and flang-new. A handful of tests have not been ported yet - these are currently either failing or not supported by the new driver. Summary of changes: * RUN lines in tests are updated to use %flang_fc1 instead of %f18 * option spellings in tests are updated to forms accepted by both f18 and flang-new * variables in Bash scripts are renamed (e.g. F18 --> FLANG_FC1) The updated tests will now be run with the new driver, flang-new, whenever it is enabled (i.e when FLANG_BUILD_NEW_DRIVER is set). Although this patch touches many files, vast majority of the changes are automatic: grep -IEZlr "%f18" flang/test/ | xargs -0 -l sed -i 's/%f18/%flang_fc1/g Differential Revision: https://reviews.llvm.org/D100309 | 5 年前 | |
[flang][driver] Add options for unparsing This patch adds the following compiler frontend driver options: * -fdebug-unparse (f18 spelling: -funparse) * -fdebug-unparse-with-symbols (f18 spelling: -funparse-with-symbols) The new driver will only accept the new spelling. f18 will accept both the original and the new spelling. A new base class for frontend actions is added: PrescanAndSemaAction. This is added to reduce code duplication that otherwise these new options would lead to. Implementation from * ParseSyntaxOnlyAction::ExecutionAction is moved to: * PrescanAndSemaAction::BeginSourceFileAction This implementation is now shared between: * PrescanAndSemaAction * ParseSyntaxOnlyAction * DebugUnparseAction * DebugUnparseWithSymbolsAction All tests that don't require other yet unimplemented options are updated. This way flang-new -fc1 is used instead of f18 when FLANG_BUILD_NEW_DRIVER is set to On. In order to facilitate this, %flang_fc1 is added in the LIT configuration (lit.cfg.py). asFortran from f18.cpp is duplicated as getBasicAsFortran in FrontendOptions.cpp. At this stage it's hard to find a good place to share this method. I suggest that we revisit this once a switch from f18 to flang-new is complete. Differential Revision: https://reviews.llvm.org/D96483 | 5 年前 | |
[flang] Better error recovery for missing THEN in ELSE IF The THEN keyword in the "ELSE IF (test) THEN" statement is useless syntactically, and to omit it is a common error (at least for me!) that has poor error recovery. This patch changes the parser to cough up a simple "expected 'THEN'" and still recognize the rest of the IF construct. Differential Revision: https://reviews.llvm.org/D110952 | 4 年前 | |
[flang] Enforce fixed form rules about END continuation From subclause 6.3.3.5: a program unit END statement cannot be continued in fixed form, and other statements cannot have initial lines that look like program unit END statements. I think this is to avoid violating assumptions that are important to legacy compilers' statement classification routines. Differential Revision: https://reviews.llvm.org/D109933 | 4 年前 | |
[flang][driver] Add debug options not requiring semantic checks This patch adds two debugging options in the new Flang driver (flang-new): *fdebug-unparse-no-sema *fdebug-dump-parse-tree-no-sema Each of these options combines two options from the "throwaway" driver (left: f18, right: flang-new): * -fdebug-uparse -fdebug-no-semantics --> -fdebug-unparse-no-sema * -fdebug-dump-parse-tree -fdebug-no-semantics --> -fdebug-dump-parse-tree-no-sema There are no plans to implement -fdebug-no-semantics in the new driver. Such option would be too powerful. Also, it would only make sense when combined with specific frontend actions (-fdebug-unparse and -fdebug-dump-parse-tree). Instead, this patch adds 2 specialised options listed above. Each of these is implemented through a dedicated FrontendAction (also added). The new frontend actions are implemented in terms of a new abstract base action: PrescanAndSemaAction. This new base class was required so that we can have finer control over what steps within the frontend are executed: * PrescanAction: run the _prescanner_ * PrescanAndSemaAction: run the _prescanner_ and the _parser_ (new in this patch) * PrescanAndSemaAction: run the _prescanner_, _parser_ and run the _semantic checks_ This patch introduces PrescanAndParseAction::BeginSourceFileAction. Apart from the semantic checks removed at the end, it is similar to PrescanAndSemaAction::BeginSourceFileAction. Differential Revision: https://reviews.llvm.org/D99645 | 5 年前 | |
[flang][driver] Add debug options not requiring semantic checks This patch adds two debugging options in the new Flang driver (flang-new): *fdebug-unparse-no-sema *fdebug-dump-parse-tree-no-sema Each of these options combines two options from the "throwaway" driver (left: f18, right: flang-new): * -fdebug-uparse -fdebug-no-semantics --> -fdebug-unparse-no-sema * -fdebug-dump-parse-tree -fdebug-no-semantics --> -fdebug-dump-parse-tree-no-sema There are no plans to implement -fdebug-no-semantics in the new driver. Such option would be too powerful. Also, it would only make sense when combined with specific frontend actions (-fdebug-unparse and -fdebug-dump-parse-tree). Instead, this patch adds 2 specialised options listed above. Each of these is implemented through a dedicated FrontendAction (also added). The new frontend actions are implemented in terms of a new abstract base action: PrescanAndSemaAction. This new base class was required so that we can have finer control over what steps within the frontend are executed: * PrescanAction: run the _prescanner_ * PrescanAndSemaAction: run the _prescanner_ and the _parser_ (new in this patch) * PrescanAndSemaAction: run the _prescanner_, _parser_ and run the _semantic checks_ This patch introduces PrescanAndParseAction::BeginSourceFileAction. Apart from the semantic checks removed at the end, it is similar to PrescanAndSemaAction::BeginSourceFileAction. Differential Revision: https://reviews.llvm.org/D99645 | 5 年前 | |
[flang][OpenMP] Added parser support for defaultmap (OpenMP 5.0) This patch adds parser support for defaultmap clause [OpenMP 5.0]. Reviewed By: kiranchandramohan, peixin, shraiysh Differential Revision: https://reviews.llvm.org/D124190 | 4 年前 | |
[flang][OpenMP] Added parser support for in_reduction clause OpenMP 5.0 adds a new clause in_reduction on OpenMP directives. This patch adds parser support for the same. Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D124156 | 4 年前 | |
[flang][OpenMP] Add parsing support for nontemporal clause. This patch adds parsing support for the nontemporal clause. Also adds a couple of test cases. Reviewed By: clementval Differential Revision: https://reviews.llvm.org/D106896 | 4 年前 | |
[flang][Parser] Add a node for individual sections in sections construct This patch adds parser nodes for each indivudual section in sections construct. This should help with the translation to FIR. !$omp section was not recognized as a construct and hence needed special handling. OpenMPSectionsConstruct contains a list of OpenMPConstruct. Each such OpenMPConstruct wraps an OpenMPSectionConstruct (section, not sections). An OpenMPSectionConstruct is a wrapper around a Block. Reviewed By: kiranchandramohan, peixin Differential Revision: https://reviews.llvm.org/D121680 | 4 年前 | |
[flang][driver] Add options for unparsing This patch adds the following compiler frontend driver options: * -fdebug-unparse (f18 spelling: -funparse) * -fdebug-unparse-with-symbols (f18 spelling: -funparse-with-symbols) The new driver will only accept the new spelling. f18 will accept both the original and the new spelling. A new base class for frontend actions is added: PrescanAndSemaAction. This is added to reduce code duplication that otherwise these new options would lead to. Implementation from * ParseSyntaxOnlyAction::ExecutionAction is moved to: * PrescanAndSemaAction::BeginSourceFileAction This implementation is now shared between: * PrescanAndSemaAction * ParseSyntaxOnlyAction * DebugUnparseAction * DebugUnparseWithSymbolsAction All tests that don't require other yet unimplemented options are updated. This way flang-new -fc1 is used instead of f18 when FLANG_BUILD_NEW_DRIVER is set to On. In order to facilitate this, %flang_fc1 is added in the LIT configuration (lit.cfg.py). asFortran from f18.cpp is duplicated as getBasicAsFortran in FrontendOptions.cpp. At this stage it's hard to find a good place to share this method. I suggest that we revisit this once a switch from f18 to flang-new is complete. Differential Revision: https://reviews.llvm.org/D96483 | 5 年前 | |
[flang] Catch mismatched parentheses in prescanner Source lines with mismatched parentheses are hard cases for error recovery in parsing, and the best error message (viz., "here's an unmatched parenthesis") can be emitted from the prescanner. Differential Revision: https://reviews.llvm.org/D111254#3046173 | 4 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 5 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 4 年前 |