[PATCH] D99292: [flang][driver] Add support for `-cpp/-nocpp`

2021-04-01 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: flang/include/flang/Frontend/CompilerInvocation.h:142 + /// + /// \param [in] ppOpts The preprocessor options + void collectMacroDefinitions(); kiranchandramohan wrote: > Nit: Misplaced? Don't see any params here.

[PATCH] D99292: [flang][driver] Add support for `-cpp/-nocpp`

2021-04-01 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 334667. awarzynski marked 3 inline comments as done. awarzynski added a comment. Update comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99292/new/ https://reviews.llvm.org/D99292 Files:

[PATCH] D99645: [flang][driver] Add debug options not requiring semantic checks

2021-03-31 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski created this revision. Herald added a reviewer: sscalpone. Herald added subscribers: jansvoboda11, dang. awarzynski requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. This patch adds two

[PATCH] D98657: [flang][driver] Add options for -Werror

2021-03-30 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. I really like how you split your tests into two files: - `werror_scan.f` captures warning generated by the prescanner - `werror.f` captures warnings from the semantic analysis In every case you added multiple RUN lines to make sure that the behavior is consistent

[PATCH] D99292: [flang][driver] Add support for `-cpp/-nocpp`

2021-03-29 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: clang/include/clang/Driver/Options.td:4302 +def cpp : Flag<["-"], "cpp">, Group, + HelpText<"Always add standard macro predefinitions">; +def nocpp : Flag<["-"], "nocpp">, Group, tskeith wrote: > This option affects

[PATCH] D99292: [flang][driver] Add support for `-cpp/-nocpp`

2021-03-29 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 333953. awarzynski added a comment. Make sure that `-cpp\-nocpp` controls command line macro definitions too As @tskeith pointed out, `-cpp\-nocpp` should also affect command line macro definitions (on top of standard macro predefinitions). With this

[PATCH] D99292: [flang][driver] Add support for `-cpp/-nocpp`

2021-03-29 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 333807. awarzynski added a comment. Address PR comments + updated comments + rebase I refined some comments and added `-fpp` to the list of file extensions. Thank you @kiranchandramohan for pointing this out! Repository: rG LLVM Github Monorepo

[PATCH] D95460: [flang][driver] Add forced form flags and -ffixed-line-length

2021-03-29 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Hi @protze.joachim , Interestingly, GCC does not _error_ when using `gfortran` flags: $ gcc -ffree-form file.c cc1: warning: command line option ‘-ffree-form’ is valid for Fortran but not for C I've implemented similar behavior for Clang in

[PATCH] D99353: [driver] Make `clang` warn rather then error on `flang` options

2021-03-25 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a subscriber: protze.joachim. awarzynski added a comment. I've not had a chance to add tests yet. I will add them shortly. @protze.joachim , hopefully this addresses the issues that you raised in https://reviews.llvm.org/D95460. Please, could you verify before I update this? I

[PATCH] D99353: [driver] Make `clang` warn rather then error on `flang` options

2021-03-25 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski created this revision. Herald added a reviewer: sscalpone. awarzynski requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch adds extra logic in Driver::ParseArgStrings so that `clang` (Clang's compiler driver) generates a

[PATCH] D99292: [flang][driver] Add support for `-cpp/-nocpp`

2021-03-24 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: flang/include/flang/Frontend/CompilerInvocation.h:135-138 + + /// Updates this instance based on the extension of the input file (e.g. f90 + /// s F90) + void updateBasedOnExtension(const FrontendInputFile );

[PATCH] D99292: [flang][driver] Add support for `-cpp/-nocpp`

2021-03-24 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski created this revision. Herald added a reviewer: sscalpone. Herald added subscribers: jansvoboda11, dang. awarzynski requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch adds support for the `-cpp` and `-nocpp` flags. The

[PATCH] D98657: [flang][driver] Add options for -Werror

2021-03-24 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. I see that `-Werror` changes the behavior of the driver in 5 different places. I would hope to see 5 new tests to verify each case. Comment at: flang/lib/Frontend/CompilerInvocation.cpp:353-354 +/// Parses all semantic related arguments and

[PATCH] D97119: [flang][driver] Add options for -std=f2018

2021-03-24 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski accepted this revision. awarzynski added a comment. This revision is now accepted and ready to land. Thank you for updating this @arnamoy10! One thing worth pointing out - this patch adds `-pedantic` rather than `-fpendatic` as @richard.barton.arm suggested. That was clearly a typo,

[PATCH] D98657: [flang][driver] Add options for -Werror

2021-03-22 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Thank you for adding this @arnamoy10 ! I think that in order to match the semantics of `-Werror` from `f18`, this patch needs to be extended a bit. In the following two cases, `f18` will exit immediately, whereas `flang-new -fc1` will happily carry-on: -

[PATCH] D99018: [clang][flang] Moke the definition of `-module-dir` restricted to Flang

2021-03-22 Thread Andrzej Warzynski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb3b002b12f2d: [clang][flang] Moke the definition of `-module-dir` restricted to Flang (authored by awarzynski). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D99018: [clang][flang] Moke the definition of `-module-dir` restricted to Flang

2021-03-21 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a subscriber: protze.joachim. awarzynski added a comment. Thank you for reviewing! In D99018#2639680 , @MaskRay wrote: > Thanks. I do not know why `FlangOption and FC1 Options` needs be in > `clang/include/clang/Driver/Options.td` but

[PATCH] D99018: [clang][flang] Moke the definition of `-module-dir` restricted to Flang

2021-03-20 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski created this revision. Herald added a reviewer: sscalpone. Herald added subscribers: jansvoboda11, dang. awarzynski requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. `-module-dir` is a Flang specific option and should not be

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-20 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski accepted this revision. awarzynski added a comment. This revision is now accepted and ready to land. LGTM, thank you for working on this! In the summary you refer to `-fdebug-module-writer`. Could you please update before merging this? Comment at:

[PATCH] D97119: [flang][driver] Add options for -std=f2018

2021-03-19 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: flang/test/Driver/std2018.f90:1 +! REQUIRES: new-flang-driver +! Ensure argument -std=f2018 works as expected. arnamoy10 wrote: > awarzynski wrote: > > Would it be possible to share this test with `f18`? > Would you

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-19 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: flang/lib/Frontend/CompilerInvocation.cpp:298 + driverPath.append("/../include/flang/"); + return driverPath.str().str(); +} Given this [[

[PATCH] D97119: [flang][driver] Add options for -std=f2018

2021-03-19 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: flang/test/Driver/std2018.f90:1 +! REQUIRES: new-flang-driver +! Ensure argument -std=f2018 works as expected. Would it be possible to share this test with `f18`? Comment at:

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-19 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: flang/lib/Frontend/CompilerInvocation.cpp:292 + std::string driverPath = llvm::sys::fs::getMainExecutable(nullptr, nullptr); + driverPath = driverPath.substr(0, driverPath.size() - 9); + return

[PATCH] D95460: [flang][driver] Add forced form flags and -ffixed-line-length

2021-03-19 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Thank you for you reply Joachim, I see 3 options here: **OPTION 1:** make Clang accept these options This would be as simple as removing the `FlangOnlyOption` from the corresponding TableGen definitions in Options.td. However, since we added help texts to their

[PATCH] D98191: [flang][driver] Add support for `-fdebug-dump-symbols-sources`

2021-03-18 Thread Andrzej Warzynski via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGeefda605fe17: [flang][driver] Add support for `-fget-symbols-sources` (authored by awarzynski). Changed prior to commit:

[PATCH] D95460: [flang][driver] Add forced form flags and -ffixed-line-length

2021-03-18 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Hi @protze.joachim, Thank you for your feedback. I'm sorry that this is causing issues in your set-up. In D95460#2632844 , @protze.joachim wrote: > Before this patch, clang would happily ignore a `-ffree-form` flag. It's a

[PATCH] D98191: [flang][driver] Add support for `-fdebug-dump-symbols-sources`

2021-03-16 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. In D98191#2611694 , @tskeith wrote: > `-fget-symbols-sources` is not a debug option, it's intended for integrating > with IDEs like vscode. So I think the original name is better. Unlike the > "dump" options it actually is an

[PATCH] D98191: [flang][driver] Add support for `-fdebug-dump-symbols-sources`

2021-03-16 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 330978. awarzynski added a comment. Switch back from `-fdebug-dump-symbols-sources` to `-fget-symbols-sources` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98191/new/ https://reviews.llvm.org/D98191

[PATCH] D96771: [OpenCL] Add distinct file extension for C++ for OpenCL

2021-03-16 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. In D96771#2628691 , @svenvh wrote: > In D96771#2626507 , @Anastasia wrote: > >> I had a second thought about the extension name and I realized that the >> reason why I initially wanted

[PATCH] D97119: [flang][driver] Add options for -std=f2018

2021-03-15 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: clang/include/clang/Driver/Options.td:3535-3536 MarshallingInfoFlag>; -def pedantic : Flag<["-", "--"], "pedantic">, Group, Flags<[CC1Option]>, - MarshallingInfoFlag>; +def pedantic : Flag<["-", "--"], "pedantic">, Group,

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-15 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. I tried reproducing the CI failures reported at the top (in particular `intrinsic_module_path.f90`), but haven't had much luck. @arnamoy10 - how about you? Could you `clang-format` this patch when uploading the next diff? Thank you! Comment at:

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-11 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Thank you for updating this @arnamoy10 ! Comment at: flang/lib/Frontend/CompilerInvocation.cpp:26 #include "llvm/Support/raw_ostream.h" + +#include "llvm/Support/FileSystem.h" Not needed Comment at:

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-10 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. In D97080#2613628 , @awarzynski wrote: > **Question**: What are the semantics for this flag in `gfortran`? Is the path > specified with `-fintrinsics-module-path` _prepended_ or _appended_ to the > default search path? I

[PATCH] D96771: [OpenCL] Add distinct file extension for C++ for OpenCL

2021-03-10 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski accepted this revision. awarzynski added a comment. Thank you for addressing my comments and for working on this! I've left one small suggestion, but that's a [nit]. Comment at: clang/test/Driver/cxx_for_opencl.cppcl:1 +// RUN: %clang %s -Xclang -verify

[PATCH] D97457: [flang][driver] Add `-fdebug-dump-parsing-log`

2021-03-10 Thread Andrzej Warzynski via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG523d7bc6f427: [flang][driver] Add `-fdebug-dump-parsing-log` (authored by awarzynski). Changed prior to commit:

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-09 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. In D97080#2586289 , @arnamoy10 wrote: > Also, not sure what to set as the default directory, as gfortran uses a > specific installation location. We probably should use a location relative to the `flang-new` binary, i.e.

[PATCH] D98191: [flang][driver] Add support for `-fdebug-dump-symbols-sources`

2021-03-08 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski created this revision. Herald added a reviewer: sscalpone. Herald added subscribers: jansvoboda11, dang. awarzynski requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Note that the original spelling in `f18` is

[PATCH] D97457: [flang][driver] Add `-fdebug-dump-parsing-log`

2021-03-08 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 328970. awarzynski added a comment. Generalise the test so that it's not architecture specific I've just realised that the test was failing in Phabricator's CI. It turns out it's an X86-only failure (i.e. the test works fine on my AArch64 dev machine).

[PATCH] D96875: [flang][driver] Add -fdebug-module-writer option

2021-03-05 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski accepted this revision. awarzynski added a comment. This revision is now accepted and ready to land. LGTM, thank you! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96875/new/ https://reviews.llvm.org/D96875 ___ cfe-commits mailing

[PATCH] D96344: [flang][driver] Add options for -fdefault* and -flarge-sizes

2021-03-04 Thread Andrzej Warzynski via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGab971c29a56a: [flang][driver] Add options for -fdefault* and -flarge-sizes (authored by arnamoy10, committed by awarzynski). Changed prior to

[PATCH] D96344: [flang][driver] Add options for -fdefault* and -flarge-sizes

2021-03-03 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski accepted this revision. awarzynski added a comment. This revision is now accepted and ready to land. I tested this with `FLANG_BUILD_NEW_DRIVER` set to`On` and `Off` - all works fine. It's been a tricky patch @arnamoy10 , thank you for all the effort! I believe that you've addressed

[PATCH] D96344: [flang][driver] Add options for -fdefault* and -flarge-sizes

2021-03-03 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski requested changes to this revision. awarzynski added a comment. This revision now requires changes to proceed. This patch won't build with `BUILD_SHARED_LIBS` set to `On`. That's because a new dependency in `CompilerInvocation` is introduced (on `IntrinsicTypeDefaultKinds`). This

[PATCH] D96875: [flang][driver] Add -fdebug-module-writer option

2021-03-01 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: clang/include/clang/Driver/Options.td:4280-4281 HelpText<"Dump provenance">; +def fdebug_module_writer : Flag<["-"],"fdebug-module-writer">, + HelpText<"Enables showing debug messages while writing module files.">;

[PATCH] D97457: [flang][driver] Add `-fdebug-dump-parsing-log`

2021-03-01 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: flang/lib/Frontend/CompilerInvocation.cpp:88-95 +// Tweak the frontend configuration based on the frontend action +static void setUpFrontendBasedOnAction(FrontendOptions ) { + assert(opts.programAction_ !=

[PATCH] D97457: [flang][driver] Add `-fdebug-dump-parsing-log`

2021-03-01 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 327048. awarzynski marked an inline comment as done. awarzynski added a comment. Move the call to setUpFrontendBasedOnAction after all options have been set Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D97457: [flang][driver] Add `-fdebug-dump-parsing-log`

2021-02-25 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski marked an inline comment as done. awarzynski added inline comments. Comment at: flang/lib/Frontend/CompilerInvocation.cpp:88-95 +// Tweak the frontend configuration based on the frontend action +static void setUpFrontendBasedOnAction(FrontendOptions ) { +

[PATCH] D97457: [flang][driver] Add `-fdebug-dump-parsing-log`

2021-02-25 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 326372. awarzynski added a comment. Remove spurious comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97457/new/ https://reviews.llvm.org/D97457 Files: clang/include/clang/Driver/Options.td

[PATCH] D97138: [clang][flang] Improve the consistency of the code-base

2021-02-25 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski accepted this revision. awarzynski added a comment. This revision is now accepted and ready to land. Thank you, this is a much appreciated improvement! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97138/new/ https://reviews.llvm.org/D97138

[PATCH] D96777: [clang][driver] Set the input type to Fortran when reading from stdin

2021-02-25 Thread Andrzej Warzynski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbaebc1162f81: [clang][driver] Set the input type to Fortran when reading from stdin (authored by awarzynski). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D97457: [flang][driver] Add `-fdebug-dump-parsing-log`

2021-02-25 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski created this revision. Herald added a reviewer: sscalpone. Herald added subscribers: jansvoboda11, dang. awarzynski requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Adds `-fdebug-dump-parsing-log` in the new driver. This option

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-02-22 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski requested changes to this revision. awarzynski added a comment. This revision now requires changes to proceed. Hi @arnamoy10 , thanks for the patch! Both `ieee_arithmetic.mod` and `iso_fortran_env.mod` look like copies of similar files from `/tools/flang/include/flang`. Could you

[PATCH] D97119: [flang][driver] Add options for -std=2018

2021-02-22 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Hi @arnamoy10 , thank for working on this! I suggest making it more explicit that the new option is about _enabling standard conformance checks_. So e.g. `enableConformanceChecks` rather than `setStandard` (or `set_EnableConformanceChecks` if the member variable is

[PATCH] D97138: [Driver] replace argc_ with argc

2021-02-22 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski requested changes to this revision. awarzynski added a comment. This revision now requires changes to proceed. Thank you for submitting this @achieveartificialintelligence ! The aim of these changes is to improve the consistency of the code-base with respect to the coding standards

[PATCH] D96864: [flang][driver] Add -Xflang and make -test-io a frontend-only flag

2021-02-22 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Thanks for reviewing @SouraVX ! I did update that comment before merging. Hopefully it _will_ make sense when we come back to it at later time :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96864/new/

[PATCH] D96864: [flang][driver] Add -Xflang and make -test-io a frontend-only flag

2021-02-22 Thread Andrzej Warzynski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd81f633fe28f: [flang][driver] Add -Xflang and make -test-io a frontend-only flang (authored by awarzynski). Changed prior to commit: https://reviews.llvm.org/D96864?vs=324287=325405#toc Repository:

[PATCH] D96777: [clang][driver] Set the input type to Fortran when reading from stdin

2021-02-22 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a subscriber: hans. awarzynski added a comment. In D96777#2578153 , @SouraVX wrote: > Thanks! for the patch. > This code touches some of the `clang` part, Anyway changes are pretty > self-explanatory. I'll leave this one to you, if you

[PATCH] D96771: [OpenCL] Add distinct file extension for C++ for OpenCL

2021-02-19 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. In D96771#2571855 , @Anastasia wrote: > This is only the initial patch and for the moment the primary goal is to > remove the need for the flag at least from the clang perspective. Shorter compiler invocation is always nice!

[PATCH] D96344: [flang][driver] Add options for -fdefault* and -flarge-sizes

2021-02-19 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski accepted this revision. awarzynski added a comment. This revision is now accepted and ready to land. I've left a few comments, but these are nice-to-haves from my perspective. @tskeith , what do you think about the suggested changes in `f18`? We could upload a separate patch for

[PATCH] D96884: [flang][driver] Add debug measure-parse-tree and pre-fir-tree options

2021-02-19 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski accepted this revision. awarzynski added a comment. This revision is now accepted and ready to land. Thank you for updating this @FarisRehman ! The original implementation of ``-fdebug-parsing-log` submitted here was not 100% compatible with `-fdebug-instrumented-parse` from `f18` as

[PATCH] D96884: [flang][driver] Add more -fdebug options

2021-02-18 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. I've just realized that for `-fdebug-parsing-log` we need to set `Fortran::parser::instrumentedParse`. I don't see a good place for that just yet. It's probably best extracting that option into a separate patch. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D96344: [flang][driver] Add options for -fdefault* and -flarge-sizes

2021-02-18 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: flang/test/Flang-Driver/fdefault.f90:10 +! RUN: not %flang-new -fsyntax-only -fdefault-double-8 %s 2>&1 | FileCheck %s --check-prefix=DOUBLE +! RUN: mkdir -p %t/dir-flang-new && %flang-new -fsyntax-only -module-dir

[PATCH] D96344: [flang][driver] Add options for -fdefault* and -flarge-sizes

2021-02-18 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: flang/test/Flang-Driver/fdefault.f90:1 +! Ensure argument -fdefault* works as expected. +! TODO: Add checks when actual codegen is possible for this family I think that this test is a great improvement compared to

[PATCH] D96771: [OpenCL] Add distinct file extension for C++ for OpenCL

2021-02-18 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Hi @Anastasia , thank you for working on this! IIUC, this patch introduces: - new input types: `TY_CLCXX` and `TY_CLCXXHeader` - new language: `OpenCLCXX` Based on the attached test, this is only to remove the need for `-cl-std=clc++`. Do you expect any other

[PATCH] D96875: [flang][driver] Add -fdebug-module-writer option

2021-02-18 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Thank you for submitting this @arnamoy10 ! Comments inline. Comment at: clang/include/clang/Driver/Options.td:4232-4233 HelpText<"Use INTEGER(KIND=8) for the result type in size-related intrinsics.">; +def fdebug_module_writer :

[PATCH] D96884: [flang][driver] Add more -fdebug options

2021-02-18 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski accepted this revision. awarzynski added a comment. This revision is now accepted and ready to land. Thank you for working on this @FarisRehman ! This semantics implemented here are identical to what `f18` does. `-fdebug-instrumented-parse` from `f18` becomes `-fdebug-parsing-log` in

[PATCH] D96716: [flang][driver] Add debug dump options

2021-02-17 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. In D96716#2569160 , @FarisRehman wrote: > They do require updating as `-fdebug-dump-symbol` and > `-fdebug-dump-parse-tree` are otherwise not tested by the new driver in this > patch. Apologies, I wasn't clear (realized

[PATCH] D96716: [flang][driver] Add debug dump options

2021-02-17 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski accepted this revision. awarzynski added a comment. This revision is now accepted and ready to land. This patch doesn't require the tests to be updated, does it? Also: https://reviews.llvm.org/D96870. So it looks these are unrelated changes. Could you remove them before merging?

[PATCH] D96864: [flang][driver] Add -Xflang and make -test-io a frontend-only flag

2021-02-17 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: flang/test/Frontend/input-output-file.f90:6 !-- +! NOTE: We need `-E` below in order to instruct the compiler driver to create a job representing a fronted compiler invocation ! TEST 1: Print to stdout

[PATCH] D96344: [flang][driver] Add options for -fdefault* and -flarge-sizes

2021-02-17 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: flang/lib/Frontend/CompilerInvocation.cpp:254 + if (args.hasArg(clang::driver::options::OPT_fdefault_real_8)) +res.defaultKinds().set_defaultRealKind(8); + if (args.hasArg(clang::driver::options::OPT_fdefault_integer_8)) {

[PATCH] D96344: [flang][driver] Add options for -fdefault* and -flarge-sizes

2021-02-17 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski requested changes to this revision. awarzynski added a comment. This revision now requires changes to proceed. Thank you for updating this! I've left a couple of small suggestions inline. Once those are addressed I believe that this is ready to land. @tskeith, any thoughts ?

[PATCH] D96864: [flang][driver] Add -Xflang and make -test-io a frontend-only flang

2021-02-17 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski created this revision. Herald added a reviewer: sscalpone. Herald added subscribers: jansvoboda11, dang. awarzynski requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch adds support for `-Xflang` in `flang-new`. The

[PATCH] D96716: [flang][driver] Add debug dump options

2021-02-16 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. I think that this patch does a great job demonstrating the use of frontend actions and how _action_ compiler flags map to them. Given how `Fortran::semantics::Semantics` are defined and created, I think that adding _semantics_ as a member variable to

[PATCH] D96777: [clang][driver] Set the input type to Fortran when reading from stdin

2021-02-16 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski created this revision. Herald added subscribers: usaxena95, kadircet. Herald added a reviewer: sscalpone. awarzynski requested review of this revision. Herald added subscribers: cfe-commits, ilya-biryukov. Herald added a project: clang. This patch makes sure that for the following

[PATCH] D96483: [flang][driver] Add options for unparsing

2021-02-16 Thread Andrzej Warzynski via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG96d229c9abdf: [flang][driver] Add options for unparsing (authored by awarzynski). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D96344: [flang][driver] Add options for -fdefault* and -flarge-sizes

2021-02-16 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: clang/include/clang/Driver/Options.td:4231 +def flarge_sizes : Flag<["-"],"flarge-sizes">, Group, + HelpText<"Set the default KIND for INTEGER to 8.">; } tskeith wrote: > That's not what -flarge-sizes does. Here

[PATCH] D96407: [flang][driver] Add extension options and -finput-charset

2021-02-15 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski accepted this revision. awarzynski added a comment. This revision is now accepted and ready to land. Thank you for addressing my comments. LGTM! Please add missing `newline` chars before merging ;-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D96483: [flang][driver] Add options for unparsing

2021-02-15 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. In D96483#2563323 , @FarisRehman wrote: > Do you know what the use of `GetActionKindName` in `FrontendOptions.h` is, as > it is currently not being called anywhere and whilst this patch currently > does not update that method

[PATCH] D96483: [flang][driver] Add options for unparsing

2021-02-15 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 323756. awarzynski added a comment. Updated lit.cfg.py Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96483/new/ https://reviews.llvm.org/D96483 Files: clang/include/clang/Driver/Options.td

[PATCH] D96344: [flang][driver] Add options for -fdefault* and -flarge-sizes

2021-02-15 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. LGTM, thank you for working on this @arnamoy10 ! I left a few _minor_ comments. These can be addressed in the actual commit. Comment at: clang/include/clang/Driver/Options.td:4224-4231 +def fdefault_double_8 : Flag<["-"],"fdefault-double-8">,

[PATCH] D95737: [NFC][Docs] Fix RAVFrontendAction doc's CMakelists.txt for Shared build

2021-02-13 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Hi @xgupta , thank you for working on this! It's quite easy to miss dependencies when building with `BUILD_SHARED_LIBS=Off` (i.e. with the default setting - static libs). IIUC, that's what happened here. This example clearly requires the following: - `ASTConsumer`

[PATCH] D96407: [flang][driver] Add extension options and -finput-charset

2021-02-12 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Thank you for submitting this @FarisRehman ! Overall this looks good to me. I've left a few minor comments inline. Also, I think that it is worth adding a help message for `-finput-charset`. Lack of it in `clang` feels like an accidental omission. We can follow GCC

[PATCH] D96344: [flang][driver] Add options for -fdefault* and -flarge-sizes

2021-02-12 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Btw, could you clang-format your patch? I normally use `git -lang-format HEAD~`. Thank you! Comment at: flang/lib/Frontend/CompilerInvocation.cpp:261 + diags.getCustomDiagID(clang::DiagnosticsEngine::Error, + "Use of

[PATCH] D96483: [flang][driver] Add options for unparsing

2021-02-11 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: flang/tools/f18/f18.cpp:541 driver.debugNoSemantics = true; -} else if (arg == "-funparse") { +} else if (arg == "-funparse" || arg == "-fdebug_unparse") { driver.dumpUnparse = true; tskeith

[PATCH] D96483: [flang][driver] Add options for unparsing

2021-02-11 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 323054. awarzynski added a comment. Fix typo in f18.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96483/new/ https://reviews.llvm.org/D96483 Files: clang/include/clang/Driver/Options.td

[PATCH] D96483: [flang][driver] Add options for unparsing

2021-02-11 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski created this revision. Herald added subscribers: dang, mgorny. Herald added a reviewer: sscalpone. Herald added a reviewer: jansvoboda11. awarzynski requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch adds the following

[PATCH] D96344: [flang][driver] Add options for -fdefault* and -flarge-sizes

2021-02-10 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Hi @arnamoy10, thank you for working on this! Overall this looks good to me, but I'm wondering whether we could simplify it a bit? More comments inline. Comment at: clang/include/clang/Driver/Options.td:4163 defm d_lines_as_comments :

[PATCH] D96032: [flang][driver] Add support for -fopenmp and -fopenacc

2021-02-09 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski accepted this revision. awarzynski added inline comments. Comment at: clang/lib/Driver/ToolChains/Flang.cpp:25-26 Args.AddAllArgs(CmdArgs, {options::OPT_ffixed_form, options::OPT_ffree_form, -options::OPT_ffixed_line_length_EQ}); +

[PATCH] D96032: [flang][driver] Add support for -fopenmp and -fopenacc

2021-02-08 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski accepted this revision. awarzynski added a comment. This revision is now accepted and ready to land. Thank you for this patch @FarisRehman , it's great to see more tests being ported to the new driver! Although this patches touches many files, it mostly just generalizes the `RUN`

[PATCH] D95448: [flang][driver] Add support for `-J/-module-dir`

2021-02-04 Thread Andrzej Warzynski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG985a42fdf8ae: [flang][driver] Add support for `-J/-module-dir` (authored by arnamoy10, committed by awarzynski). Changed prior to commit: https://reviews.llvm.org/D95448?vs=320617=321448#toc

[PATCH] D94533: [clang] Add AddClang.cmake to the list of the CMake modules that are installed

2021-02-04 Thread Andrzej Warzynski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG62e4f22e297a: [clang] Add AddClang.cmake to the list of the CMake modules that are installed (authored by awarzynski). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D95460: [flang][driver] Add forced form flags and -ffixed-line-length

2021-02-03 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski accepted this revision. awarzynski added a comment. This revision is now accepted and ready to land. Thank you for working on this @FarisRehman ! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95460/new/ https://reviews.llvm.org/D95460

[PATCH] D95448: [flang][driver] Add support for `-J/-module-dir`

2021-02-02 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. LGTM! Thank you for addressing my comments, (`DELETEME` can be fixed when pushing upstream)! From what I can see you've also addressed all of Tim's comments, but could you wait a day or two before merging this? Just in case I missed something, or Tim or somebody

[PATCH] D95448: [flang][driver] Add support for `-J/-module-dir`

2021-02-01 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: flang/test/Flang-Driver/include-module.f90:15 +! RUN: not %flang-new -fsyntax-only -module-dir %S/Inputs %s 2>&1 | FileCheck %s --check-prefix=SINGLEINCLUDE +! RUN: not %flang-new -fsyntax-only -J %S/Inputs/module-dir -J %S/Inputs/

[PATCH] D95448: [flang][driver] Add support for `-J/-module-dir`

2021-02-01 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. @arnamoy10 Thank you for addressing my comments! As for testing that `-J/-module-dir` are taken into account when specifying the output directory for modules, could try adding the following: ! RUN: mkdir -p %t/dir-f18 && %f18 -fparse-only -I

[PATCH] D95460: [flang][driver] Add forced form flags and -ffixed-line-length

2021-01-29 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. @FarisRehman, thank you for addressing my comments! I've just realised that `gfortran` doesn't actually support `-fno-fixed-form` or `-fno-free-form`: $ gfortran -ffixed-form -fno-fixed-form test.f gfortran: error: unrecognized command line option

[PATCH] D95448: [flang][driver] Add support for `-J/-module-dir`

2021-01-28 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. @arnamoy10 , could you also add tests that show that `-J/-module-dir` is taken into account when deciding where to put module files? Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95448/new/

[PATCH] D95460: [flang][driver] Add forced form flags and -ffixed-line-length

2021-01-27 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Thank you for working on this @FarisRehman ! I've left a few inline comments, but nothing major. Really nice to see this being added and working as expected! Comment at: clang/include/clang/Driver/Options.td:4074-4076 +def ffixed_line_length_VALUE

[PATCH] D95448: [flang][driver] Add support for `-J/-module-dir`

2021-01-27 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. @arnamoy10, thank you for this patch and for working on this! I have a few high-level suggestions (+ some inline comments): **Q1** `-module-dir` and `-J` in Options.td should be aliases - otherwise we need to duplicate some code. I've not used Aliases myself, but

[PATCH] D94533: [clang] Add AddClang.cmake to the list of the CMake modules that are installed

2021-01-20 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Ping. Would anyone be able to take a look? Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94533/new/ https://reviews.llvm.org/D94533 ___ cfe-commits mailing list

[PATCH] D93453: [flang][driver] Add support for `-I`

2021-01-19 Thread Andrzej Warzynski via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG87dfd5e012e1: [flang][driver] Add support for `-I` in the new driver (authored by FarisRehman, committed by awarzynski). Changed prior to commit:

<    1   2   3   4   5   6   7   >