[PATCH] D143301: Emit warning for unsupported gfortran flags

2023-02-14 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. In D143301#4126855 , @jdoerfert wrote: > In D143301#4126712 , @awarzynski > wrote: > >>> I think the -W stuff can go in, it has tests and is reasonable. >> >> I'd like for us to rely o

[PATCH] D143301: Emit warning for unsupported gfortran flags

2023-02-14 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. In D143301#4126884 , @elmcdonough wrote: > Thanks for the feedback everyone. This is my current understanding on what I > should do: I am to rename gfortran_unsupported_Group to flang_ignored_w_Group > and move the non W gr

[PATCH] D143301: [flang] Handle unsupported warning flags

2023-02-14 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Thanks for the update! One thing that's not clear to me - how come "-Wextra" **is not** treated as an error and "-Wblah" **is**? That's not clear from the code. I'm also realising that I incorrectly assumed that `-Wextra` was defined in Options.td. Instead, it's def

[PATCH] D143301: [flang] Handle unsupported warning flags

2023-02-17 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. @elmcdonough , let me rephrase this (should've been clearer before, sorry): > One thing that's not clear to me - how come "-Wextra" is not treated as an > error and "-Wblah" is? Where's the logic that makes sure that `-Wextra` (and other flags that you redefine here

[PATCH] D143301: [flang] Handle unsupported warning flags

2023-02-21 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: clang/include/clang/Driver/Options.td:5045 +// Unsupported flang W options +defm : FlangIgnoredDiagOpt<"extra">; The name of the sub-project is "Flang", the sub-dir is "flang" and the driver name is "flang-new". Wh

[PATCH] D143301: [flang] Handle unsupported warning flags

2023-02-21 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, thanks for seeing this through! :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143301/new/ https://reviews.llvm.org/D143301 ___

[PATCH] D150354: [OpenMP][MLIR][Flang][bbc][Driver] Add fopenmp-version and generate corresponding MLIR attribute

2023-05-12 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. All in all LGTM, but I'm not sure whether Flang should be defaulting to OpenMP 5.0. AFAIK, that's not supported yet. Comment at: clang/lib/Driver/ToolChains/Flang.cpp:34 + Args.AddAllArgs(CmdArgs, {options::OPT_ffixed_form, +

[PATCH] D148038: [Flang][OpenMP][Driver][MLIR] Port fopenmp-host-ir-file-path flag and add MLIR module attribute to proliferate to OpenMP IR lowering

2023-04-19 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: clang/include/clang/Driver/Options.td:6558 HelpText<"Path to the IR file produced by the frontend for the host.">, - Flags<[CC1Option, NoDriverOption]>; + Flags<[CC1Option, FC1Option, NoDriverOption]>; With bot

[PATCH] D148038: [Flang][OpenMP][Driver][MLIR] Port fopenmp-host-ir-file-path flag and add MLIR module attribute to proliferate to OpenMP IR lowering

2023-04-23 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: flang/lib/Frontend/CompilerInvocation.cpp:730 +res.getLangOpts().OMPHostIRFile = arg->getValue(); +if (!llvm::sys::fs::exists(res.getLangOpts().OMPHostIRFile)) + diags.Report(clang::diag::err_drv_omp_host_ir_f

[PATCH] D148038: [Flang][OpenMP][Driver][MLIR] Port fopenmp-host-ir-file-path flag and add MLIR module attribute to proliferate to OpenMP IR lowering

2023-04-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. LGTM, thanks for addressing my comments! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148038/new/ https://reviews.llvm.org/D148038 ___

[PATCH] D148038: [Flang][OpenMP][Driver][MLIR] Port fopenmp-host-ir-file-path flag and add MLIR module attribute to proliferate to OpenMP IR lowering

2023-04-24 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. In D148038#4292549 , @agozillon wrote: > In D148038#4292262 , @awarzynski > wrote: > >> LGTM, thanks for addressing my comments! > > Thank you for your time and the great review commen

[PATCH] D134821: [flang][driver] Allow main program to be in an archive

2023-04-24 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Thanks for all the great effort, @ekieri ! @sunshaoce , mostly makes sense, just a few small suggestions. @peixin , wdyt? Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:601-603 +// A Fortran main program will be lowered to a function named _QQm

[PATCH] D134821: [flang][driver] Allow main program to be in an archive

2023-04-27 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski accepted this revision. awarzynski added a comment. In D134821#4301701 , @sunshaoce wrote: > Any further suggestions? I am happy for you to land this, thanks! LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

[PATCH] D134821: [flang][driver] Allow main program to be in an archive

2023-04-28 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. I've just reverted this patch - for context please see https://reviews.llvm.org/D149429. @sunshaoce This was committed without acknowledging @ekieri 's contribution, so didn't follow the official

[PATCH] D134821: [flang][driver] Allow main program to be in an archive

2023-05-04 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. In D134821#4317371 , @peixin wrote: >> @peixin , wdyt? > > @awarzynski Hi Andrzej, sorry for the late reply. I am distracted by several > internal projects and other things in my life recently (just came back from > vacation)

[PATCH] D116395: [Clang] Emit warning for -x option without effects

2022-01-27 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: clang/test/Driver/redundant-args.c:2 +// RUN: %clang -target x86_64-apple-darwin10 -Werror -x c -x c -fsyntax-only %s +// RUN: %clang -target x86_64-apple-darwin10 %s -### -x c 2>&1 | FileCheck %s + hans wrote: > Thes

[PATCH] D93401: [flang][driver] Add support for `-D`, `-U`

2022-01-27 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: flang/include/flang/Frontend/CompilerInvocation.h:89 + /// These values are found in the preprocessor options. + void setFortranOpts(); }; clementval wrote: > @awarzynski I was looking at this file recently and I w

[PATCH] D120246: [flang][driver] Add support for `--target`/`--triple`

2022-02-21 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski created this revision. awarzynski added reviewers: rovka, clementval, schweitz, Leporacanthicus. Herald added subscribers: dang, usaxena95, kadircet. Herald added a reviewer: sscalpone. Herald added a project: Flang. awarzynski requested review of this revision. Herald added subscribers:

[PATCH] D120246: [flang][driver] Add support for `--target`/`--triple`

2022-02-22 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 410469. awarzynski added a comment. Add TargetOptions.h (that I forgot to add earlier) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120246/new/ https://reviews.llvm.org/D120246 Files: clang/include/clang

[PATCH] D120246: [flang][driver] Add support for `--target`/`--triple`

2022-02-23 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 410826. awarzynski added a comment. Add a test for `--print-effective-triple` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120246/new/ https://reviews.llvm.org/D120246 Files: clang/include/clang/Driver/O

[PATCH] D120246: [flang][driver] Add support for `--target`/`--triple`

2022-02-23 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Thank you both for taking a look! In D120246#3339284 , @rovka wrote: > Nit: Should we also have a test for print-effective-triple? Added. > I'm not sure that -emit-llvm is necessarily something we'd want flang users > to be

[PATCH] D120246: [flang][driver] Add support for `--target`/`--triple`

2022-02-23 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: clang/include/clang/Driver/Options.td:4815 -} +} // let Flags = [CC1Option, CC1AsOption, NoDriverOption] + schweitz wrote: > Is this comment something left over from edits? This is intentional (there's already a [[

[PATCH] D120246: [flang][driver] Add support for `--target`/`--triple`

2022-02-23 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 410836. awarzynski added a comment. Rebase on top of `main` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120246/new/ https://reviews.llvm.org/D120246 Files: clang/include/clang/Driver/Options.td clang/

[PATCH] D120246: [flang][driver] Add support for `--target`/`--triple`

2022-02-25 Thread Andrzej Warzynski via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG2e9439e4891c: [flang][driver] Add support for `--target`/`--triple

[PATCH] D120246: [flang][driver] Add support for `--target`/`--triple`

2022-02-25 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Thank you all for taking a look! I've just realised this: "This revision was not accepted when it landed; it landed in state Needs Review." Just to clarify, I merged this as two reviewers accepted this in comments (with "LGTM"). Also, I believe that I addressed all

[PATCH] D120568: [flang][driver] Add support for -S and implement -c/-emit-obj

2022-02-25 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski created this revision. awarzynski added reviewers: rovka, clementval, schweitz, Leporacanthicus. Herald added subscribers: Chia-hungDuan, mehdi_amini, dang, rriddle, pengfei, kristof.beyls, mgorny. Herald added a reviewer: sscalpone. Herald added a project: Flang. awarzynski requested r

[PATCH] D120568: [flang][driver] Add support for -S and implement -c/-emit-obj

2022-02-28 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski marked 3 inline comments as done. awarzynski added inline comments. Comment at: flang/lib/Frontend/FrontendActions.cpp:43 using namespace Fortran::frontend; +using namespace llvm; schweitz wrote: > You'll want to keep in mind that some class names a

[PATCH] D120568: [flang][driver] Add support for -S and implement -c/-emit-obj

2022-02-28 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 411803. awarzynski added a comment. Incorproate suggestions from Eric Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120568/new/ https://reviews.llvm.org/D120568 Files: clang/include/clang/Driver/Options.t

[PATCH] D120568: [flang][driver] Add support for -S and implement -c/-emit-obj

2022-02-28 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 411812. awarzynski added a comment. Fix formatting and rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120568/new/ https://reviews.llvm.org/D120568 Files: clang/include/clang/Driver/Options.td flan

[PATCH] D120568: [flang][driver] Add support for -S and implement -c/-emit-obj

2022-02-28 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 411835. awarzynski added a comment. Update how target IR analysis passes are initialised (use `TargetMachine::getTargetIRAnalysis()` instead of calling the constructor directly). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:/

[PATCH] D120568: [flang][driver] Add support for -S and implement -c/-emit-obj

2022-03-01 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 412008. awarzynski added a comment. Herald added subscribers: llvm-commits, dexonsmith. Herald added a project: LLVM. Add a forward declaration for `class PassInstrumentation` (thank you @rovka!) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D120568: [flang][driver] Add support for -S and implement -c/-emit-obj

2022-03-01 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: flang/lib/Frontend/FrontendActions.cpp:509 + TargetRegistry::lookupTarget(theTriple, error); + assert(theTarget && "Failed to create Target"); + rovka wrote: > Shouldn't this be a diagnostic? People could be try

[PATCH] D120568: [flang][driver] Add support for -S and implement -c/-emit-obj

2022-03-02 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: flang/lib/Frontend/FrontendActions.cpp:561 + std::make_unique(triple); + CodeGenPasses.add(new llvm::TargetLibraryInfoWrapperPass(*TLII)); + schweitz wrote: > Got jumbled around somehow. TLII is allocated at lin

[PATCH] D120568: [flang][driver] Add support for -S and implement -c/-emit-obj

2022-03-02 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 412386. awarzynski added a comment. - Got rid of `tripleName` - Added an assert for the newly created TLII - Rebased - Added `#includes` missing after the rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D120568: [flang][driver] Add support for -S and implement -c/-emit-obj

2022-03-04 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 412963. awarzynski added a comment. Rebase on top of D120897 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120568/new/ https://reviews.llvm.org/D120568 Files: clang/incl

[PATCH] D121198: [flang][driver] Add support for `-debug-dump-pft`

2022-03-08 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski created this revision. Herald added a reviewer: sscalpone. Herald added a subscriber: dang. Herald added projects: Flang, All. awarzynski requested review of this revision. Herald added subscribers: cfe-commits, jdoerfert. Herald added a project: clang. This patch adds support for dumpi

[PATCH] D121198: [flang][driver] Add support for `-debug-dump-pft`

2022-03-08 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. In D121198#3366741 , @clementval wrote: > I’m not sure this is a feature we want to expose in the main driver. It's only available in `flang-new -fc1`, i.e. the frontend driver. We are not exposing it in `flang-new`. Repos

[PATCH] D121198: [flang][driver] Add support for `-debug-dump-pft`

2022-03-08 Thread Andrzej Warzynski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8321579b2830: [flang][driver] Add support for `-debug-dump-pft` (authored by awarzynski). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121198/new/ https://

[PATCH] D101387: [Clang] remove text extension from diag::err_drv_invalid_value_with_suggestion

2021-05-01 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. In D101387#2730043 , @nickdesaulniers wrote: > @FarisRehman when I run `llvm-lit -vv > flang/test/Driver/fixed-line-length.f90` I see: > > UNSUPPORTED: Flang :: Driver/fixed-line-length.f90 (1 of 1) > > This is with `-DLLVM

[PATCH] D116731: [Clang] Make Clang copy its CMake modules into the build dir

2022-01-06 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski created this revision. Herald added subscribers: Chia-hungDuan, rriddle, mgorny. awarzynski requested review of this revision. Herald added subscribers: cfe-commits, stephenneuendorffer. Herald added a project: clang. LLVM has a documented mechanism for passing configuration information

[PATCH] D116731: [Clang] Make Clang copy its CMake modules into the build dir

2022-01-06 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. For a bit of context - this came up in a discussion for https://reviews.llvm.org/D116566/. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116731/new/ https://reviews.llvm.org/D116731

[PATCH] D116731: [Clang] Make Clang copy its CMake modules into the build dir

2022-01-10 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. @PeteSteinfeld , thank you for testing this change! I want to make sure that people who are just back from their breaks get a chance to take a look, so I'll wait another day or two before merging. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D116731: [Clang] Make Clang copy its CMake modules into the build dir

2022-01-12 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 rGdfd9879d6f43: [Clang] Make Clang copy its CMake modules into the build dir (authored by awarzynski). Changed prior to commit: https://reviews.llvm

[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 t

[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 Files:

[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] 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-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: https://reviews.llvm.org/

[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 defi

[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 driverPath.append("/../include/flang/

[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: flang/test/Driver/std20

[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 [[ https://github.com/llvm/llvm-project/blob/987ee6e3cc1fb672b3ed201e72a5281c2

[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 p

[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: flang/lib/Fronten

[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 visibl

[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 pe

[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 https://reviews.llvm.org/

[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: - https://g

[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, s

[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 popul

[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 im

[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 &inputFile);

[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 wa

[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] 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 https://reviews.llvm

[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 CHANG

[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 chang

[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] 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 acr

[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] 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: clang/inclu

[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] D98657: [flang][driver] Add options for -Werror

2021-04-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 for addressing my comments! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98657/new/ https://reviews.llvm.org/D98657 _

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

2021-04-05 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Hi @protze.joachim , thank you for testing this so thoroughly! In D99353#2656215 , @protze.joachim wrote: > I tested with `-Werror`: > > $ flang -fopenmp test-f77.f -ffree-form -c > $ clang -fopenmp test-f77.o -ffree-form

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

2021-04-05 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 335270. awarzynski added a comment. Herald added subscribers: jansvoboda11, dang. Refine the behaviour when using diag options and add tests - `-Werror` will now elevate the warning generated here to an error. This is consistent with `gcc`. To this end I

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

2021-04-05 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 335275. awarzynski added a comment. Add more reviewers and remove unrelated changes (apologies for the noise!) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99353/new/ https://reviews.llvm.org/D99353 Files:

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

2021-04-05 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: clang/lib/Driver/Driver.cpp:294-297 +// TODO: This currently doesn't work as information about aliases is +// lost when generating "unknown" options. +if (auto Alias = A->getAlias()) + ExpectedDistance

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

2021-04-06 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 335566. awarzynski added a comment. Update `f18.cpp` and driver-help.f90 to improve testing - added -fdebug-unparse-no-sema and -fdebug-dump-parse-tree-no-sema in f18.cpp (for compatibility with flang-new) - updated driver-help.f90 with the new options

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

2021-04-06 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: flang/test/Parser/omp-allocate-unparse.f90:1 -! RUN: %f18 -fdebug-no-semantics -funparse -fopenmp %s | FileCheck %s +! RUN: %flang_fc1 -fdebug-unparse-no-sema -fopenmp %s | FileCheck %s ! Check Unparsing of OpenMP Allocate directive

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

2021-04-06 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 335587. awarzynski added a comment. Remove unused variable Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99645/new/ https://reviews.llvm.org/D99645 Files: clang/include/clang/Driver/Options.td flang/inc

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

2021-04-06 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: flang/lib/Frontend/FrontendActions.cpp:127 + + auto &parseTree{*ci.parsing().parseTree()}; + ashermancinelli wrote: > Is this variable unused? How did it get here? :) Thank you, updated! Repository: rG LLVM Githu

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

2021-04-07 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 rGb83a4450c216: [flang][driver] Add support for `-cpp/-nocpp` (authored by awarzynski). Changed prior to commit: https://reviews.llvm.org/D99292?vs=

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

2021-04-07 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. As there have been no new comments and this patch has already been accepted, I decided to merge it without waiting for more reviews. Please leave post-commit comments if I missed anything and I will address them. Thank you all for reviewing! Repository: rG LLVM G

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

2021-04-07 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: clang/include/clang/Driver/Options.td:4378 HelpText<"Run the InputOuputTest action. Use for development and testing only.">; +def fdebug_unparse_no_sema : Flag<["-"], "fdebug-unparse-no-sema">, Group, + HelpText<"Unparse and sto

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

2021-04-07 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 335820. awarzynski added a comment. Add DocBrief descriptions in Options.td I added the descriptions so that it's documented what the options are intended for and to avoid confusion in the future. Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

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

2021-04-07 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: clang/include/clang/Driver/Options.td:4378 HelpText<"Run the InputOuputTest action. Use for development and testing only.">; +def fdebug_unparse_no_sema : Flag<["-"], "fdebug-unparse-no-sema">, Group, + HelpText<"Unparse and sto

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

2021-04-07 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. In D99353#2672503 , @protze.joachim wrote: > In D99353#2669046 , @awarzynski > wrote: > >> Btw, how important are these aliases for you? > > It's just not obvious from `flang --help` th

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

2021-04-08 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 rGe81b3401177a: [flang][driver] Add debug options not requiring semantic checks (authored by awarzynski). Changed prior to commit: https://reviews.l

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

2021-04-08 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. In D99645#2674496 , @kiranchandramohan wrote: > LGTM. > > Might be good to have a test for fdebug-dump-parse-tree-no-sema. Good point, added before merging into main! Thank you for reviewing. Repository: rG LLVM Github Mon

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

2021-04-08 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 336075. awarzynski added a comment. Refine comments, remove code for aliases (which didn't work anyway) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99353/new/ https://reviews.llvm.org/D99353 Files: clan

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

2021-04-08 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. I've just send an RFC for this change to cfe-dev: https://lists.llvm.org/pipermail/cfe-dev/2021-April/067981.html. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99353/new/ https://reviews.llvm.org/D99353 __

[PATCH] D100558: [flang][driver] Add support for `-fget-definition`

2021-04-15 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 `-fget-definition` to `flang-new`. The semantics

[PATCH] D100558: [flang][driver] Add support for `-fget-definition`

2021-04-15 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 337747. awarzynski added a comment. Rebase on top of D100556 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100558/new/ https://reviews.llvm.org/D100558 Files: clang/incl

[PATCH] D100558: [flang][driver] Add support for `-fget-definition`

2021-04-21 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 rGdc256a443a45: [flang][driver] Add support for `-fget-definition` (authored by awarzynski). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D93301: [flang][driver] Add support for `-c` and `-emit-obj`

2021-01-04 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93301/new/ https://reviews.llvm.org/D93301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D93401: [flang][driver] Add support for `-D`, `-U`

2021-01-04 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 , LGTM! From what I can tell you also addressed the point that @tskeith raised (updated commit msg and added a dedicated test). Ccould you wa

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

2021-01-04 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. I left a few nits, but otherwise LGTM! Comment at: clang/lib/Driver/ToolChains/Flang.cpp:25 Args.AddAllArgs(CmdArgs, {options::OPT_D, options::OPT_U}); + Args.AddAllArgs(CmdArgs, options::OPT_I); } [nit] This probably can be mer

[PATCH] D94169: [clang][driver] Restore the original help text for `-I`

2021-01-06 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski created this revision. Herald added a subscriber: dang. awarzynski requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The help text for `-I` was recently expanded in this commit: - 8dd4e3ceb804a58bcf25e6856fc6fde5e1995a66

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

2021-01-06 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. In D93453#2481720 , @sscalpone wrote: > Flang supports include files and module files. The search path is used to > look for both include files and module files. The help text doesn't include > info about module files. Good

[PATCH] D93401: [flang][driver] Add support for `-D`, `-U`

2021-01-06 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 rG7809fa204000: [flang][driver] Add support for `-D`, `-U` (authored by FarisRehman, committed by awarzynski). Changed prior to commit: https://revi

<    1   2   3   4   5   6   7   >