[clang] [flang] [flang] Align `-x` language modes with `gfortran` (PR #130268)

2025-03-07 Thread Tarun Prabhu via cfe-commits
=?utf-8?q?Iñaki?= Amatria Barral Message-ID: In-Reply-To: @@ -0,0 +1,12 @@ +! This test verifies that using `-x f95` does not cause the driver to assume +! this file is in fixed-form. + +program main + print *, "Hello, World!" +end + +! RUN: %flang -### -x f95 %s 2>&1 | FileCh

[clang] [flang] [flang] Align `-x` language modes with `gfortran` (PR #130268)

2025-03-07 Thread Tarun Prabhu via cfe-commits
=?utf-8?q?Iñaki?= Amatria Barral Message-ID: In-Reply-To: @@ -0,0 +1,35 @@ +program main + print *, __FILE__, __LINE__ +end + +! This test verifies that `flang`'s `-x` options behave like `gfortran`'s. +! Specifically: +! - `-x f95` should process the file based on its extensi

[clang] [flang] [flang] Align `-x` language modes with `gfortran` (PR #130268)

2025-03-07 Thread Tarun Prabhu via cfe-commits
=?utf-8?q?I=C3=B1aki?= Amatria Barral Message-ID: In-Reply-To: https://github.com/tarunprabhu commented: Thanks for continuing to see this through https://github.com/llvm/llvm-project/pull/130268 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [flang] [flang] Add options -W[no-]unused-dummy-argument and -W[no-]unused-variable (PR #127214)

2025-03-07 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: Thanks for working on this @JDPailleux. This looks like a substantial change including to parts of clang. Is it possible to split this into two. One PR for just the "infrastructure" and another for the flang-specifc warnings. This would make it easier to focus the discussi

[clang] [flang] [flang] Align `-x` language modes with `gfortran` (PR #130268)

2025-03-07 Thread Tarun Prabhu via cfe-commits
=?utf-8?q?Iñaki?= Amatria Barral Message-ID: In-Reply-To: https://github.com/tarunprabhu edited https://github.com/llvm/llvm-project/pull/130268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [flang] [flang] Align `-x` language modes with `gfortran` (PR #130268)

2025-03-07 Thread Tarun Prabhu via cfe-commits
=?utf-8?q?Iñaki?= Amatria Barral Message-ID: In-Reply-To: @@ -0,0 +1,35 @@ +program main + print *, __FILE__, __LINE__ +end + +! This test verifies that `flang`'s `-x` options behave like `gfortran`'s. +! Specifically: +! - `-x f95` should process the file based on its extensi

[clang] [flang] [flang/clang] Adding use of Clang's diagnostics in Flang (PR #130593)

2025-03-11 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: For compiler options, we have various "categories" in `Options.td`, `ClangOptions`, `FlangOptions` etc. which only apply to specific frontends. I haven't looked very closely at this, but I believe that there is only one "category" for warnings. Is this correct? If that the c

[clang] [flang] [flang] Add support for -f[no-]verbose-asm (PR #130788)

2025-03-13 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu approved this pull request. Thanks for all the changes, Tom! LGTM. https://github.com/llvm/llvm-project/pull/130788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [flang] [flang] Align `-x` language modes with `gfortran` (PR #130268)

2025-03-12 Thread Tarun Prabhu via cfe-commits
=?utf-8?q?I=C3=B1aki?= Amatria Barral Message-ID: In-Reply-To: https://github.com/tarunprabhu approved this pull request. Thanks for all the changes :-) https://github.com/llvm/llvm-project/pull/130268 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [flang] [flang] Add support for -f[no-]verbose-asm (PR #130788)

2025-03-12 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu commented: Do we really want to maintain an equivalence with clang by keeping this in `CodeGenOptions` when it really ought to be a `TargetOption`? It looks like almost all of the handling of this option takes place in `flang`, so we probably shouldn't be bound t

[clang] [flang] [flang] Add support for -f[no-]verbose-asm (PR #130788)

2025-03-12 Thread Tarun Prabhu via cfe-commits
@@ -172,7 +172,8 @@ void Flang::addCodegenOptions(const ArgList &Args, options::OPT_finit_global_zero, options::OPT_fno_init_global_zero, options::OPT_ftime_report, options::OPT_ftime_report_EQ, options::OPT_funroll_loop

[clang] [flang] [flang] Add -f[no-]slp-vectorize flags (PR #132801)

2025-03-24 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: > > If you are soliciting reviews, you could also use the "Reviewers" box on > > the top right of this page > > I would, but I do not currently have the right permissions to use the box. > Hence the ccs - I need someone else to do it. Huh. I didn't realize that one needed s

[clang] [flang] [flang] Add -f[no-]slp-vectorize flags (PR #132801)

2025-03-24 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu requested changes to this pull request. https://github.com/llvm/llvm-project/pull/132801 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Add -f[no-]slp-vectorize flags (PR #132801)

2025-03-24 Thread Tarun Prabhu via cfe-commits
@@ -4032,11 +4032,14 @@ def : Flag<["-"], "ftree-vectorize">, Alias; def : Flag<["-"], "fno-tree-vectorize">, Alias; } +let Visibility = [ClangOption, FlangOption] in { tarunprabhu wrote: I think we should merge this with the visibility block for `fvectorize`

[clang] [flang] [flang] Add -f[no-]slp-vectorize flags (PR #132801)

2025-03-24 Thread Tarun Prabhu via cfe-commits
@@ -0,0 +1,10 @@ +! RUN: %flang -### -S -fslp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s +! RUN: %flang -### -S -fno-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s +! RUN: %flang -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CH

[clang] [flang] [flang] Add -f[no-]slp-vectorize flags (PR #132801)

2025-03-24 Thread Tarun Prabhu via cfe-commits
@@ -161,6 +161,14 @@ void Flang::addCodegenOptions(const ArgList &Args, options::OPT_fno_vectorize, enableVec)) CmdArgs.push_back("-vectorize-loops"); + // -fslp-vectorize is enabled based on the optimization level selected. + bool EnableSLPVec = shoul

[clang] [flang] [flang] Add -f[no-]slp-vectorize flags (PR #132801)

2025-03-24 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: > cc @tblah @DavidTruby If you are soliciting reviews, you could also use the "Reviewers" box on the top right of this page https://github.com/llvm/llvm-project/pull/132801 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [flang] [flang][OpenMP] Bump default OpenMP version to 3.1 (PR #133745)

2025-03-31 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu approved this pull request. Thanks Tom. This looks fine to me, but please wait for those more familiar with OpenMP before merging. https://github.com/llvm/llvm-project/pull/133745 ___ cfe-commits mailing list cfe-commits

[clang] [flang] [flang] Complete alignment of -x language modes with gfortran (PR #133775)

2025-03-31 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu commented: Other than the nit, this looks ok. However, I must admit that I don't fully understand the nuances of the various modes, and I got a bit lost with the previous PR as well, so I'll leave it to someone else to approve as they see fit. https://github.com

[clang] [flang] [flang] Complete alignment of -x language modes with gfortran (PR #133775)

2025-03-31 Thread Tarun Prabhu via cfe-commits
@@ -88,8 +88,8 @@ TYPE("assembler-with-cpp", Asm, PP_Asm, "S", phases // modules when Flang needs to emit pre-processed files. Therefore, the // `PP_TYPE` is set to `PP_Fortran` so that the driver is fine with // "pre-processing a pre-processed fil

[clang] [flang] [driver] Generalize the code that adds the path of libflang_rt.runtime.a. (PR #134362)

2025-04-04 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu approved this pull request. LGTM. Thanks! https://github.com/llvm/llvm-project/pull/134362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Add -f[no-]slp-vectorize flags (PR #132801)

2025-03-25 Thread Tarun Prabhu via cfe-commits
@@ -3177,3 +3177,25 @@ bool tools::shouldEnableVectorizerAtOLevel(const ArgList &Args, bool isSlpVec) { return false; } + +/// Enable -fvectorize based on the optimization level selected. +void tools::handleVectorizeLoopsArgs(const ArgList &Args, +

[clang] [flang] [flang] Added driver options for arrays repacking. (PR #134002)

2025-04-02 Thread Tarun Prabhu via cfe-commits
@@ -6974,6 +7019,22 @@ defm loop_versioning : BoolOptionWithoutMarshalling<"f", "version-loops-for-stri PosFlag, NegFlag>; +defm stack_repack_arrays +: BoolOptionWithoutMarshalling< + "f", "stack-repack-arrays", + PosFlag, + NegFlag< +

[clang] [flang] [flang] Added driver options for arrays repacking. (PR #134002)

2025-04-02 Thread Tarun Prabhu via cfe-commits
@@ -0,0 +1,24 @@ +! Test forwarding just the forwarding of -f[no-]stack-repack-arrays options: tarunprabhu wrote: ```suggestion ! Test forwarding of -f[no-]stack-repack-arrays options: ``` https://github.com/llvm/llvm-project/pull/134002

[clang] [flang] [flang] Complete alignment of -x language modes with gfortran (PR #133775)

2025-04-02 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu approved this pull request. Thanks for the changes, David. :-) https://github.com/llvm/llvm-project/pull/133775 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [flang] [flang] Added driver options for arrays repacking. (PR #134002)

2025-04-02 Thread Tarun Prabhu via cfe-commits
@@ -0,0 +1,24 @@ +! Test forwarding just the forwarding of -f[no-]repack-arrays options: tarunprabhu wrote: ```suggestion ! Test forwarding of -f[no-]repack-arrays options: ``` https://github.com/llvm/llvm-project/pull/134002

[clang] [flang] [flang] Added driver options for arrays repacking. (PR #134002)

2025-04-02 Thread Tarun Prabhu via cfe-commits
@@ -0,0 +1,27 @@ +! Test forwarding just the forwarding of -frepack-arrays-contiguity options: tarunprabhu wrote: ```suggestion ! Test forwarding of -frepack-arrays-contiguity options: ``` https://github.com/llvm/llvm-project/pull/134002

[clang] [flang] [Flang][OpenMP][Driver][AMDGPU] Fix -mcode-object-version (PR #134230)

2025-04-03 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu approved this pull request. LGTM. Thanks. https://github.com/llvm/llvm-project/pull/134230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Add -f[no-]slp-vectorize flags (PR #132801)

2025-03-25 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu approved this pull request. Apart from the docstrings, this looks good. Thanks for the changes :-) https://github.com/llvm/llvm-project/pull/132801 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [flang] [flang] Add -f[no-]slp-vectorize flags (PR #132801)

2025-03-25 Thread Tarun Prabhu via cfe-commits
@@ -3177,3 +3177,25 @@ bool tools::shouldEnableVectorizerAtOLevel(const ArgList &Args, bool isSlpVec) { return false; } + +/// Enable -fvectorize based on the optimization level selected. +void tools::handleVectorizeLoopsArgs(const ArgList &Args, +

[clang] [flang] [flang] Add -f[no-]slp-vectorize flags (PR #132801)

2025-03-25 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu edited https://github.com/llvm/llvm-project/pull/132801 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Add -f[no-]slp-vectorize flags (PR #132801)

2025-03-25 Thread Tarun Prabhu via cfe-commits
@@ -3177,3 +3177,25 @@ bool tools::shouldEnableVectorizerAtOLevel(const ArgList &Args, bool isSlpVec) { return false; } + +/// Enable -fvectorize based on the optimization level selected. tarunprabhu wrote: It might be better to move the docstrings to `Com

[clang] [flang] [flang] Add -f[no-]slp-vectorize flags (PR #132801)

2025-03-26 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: Is this buildbot failure related: [https://lab.llvm.org/buildbot/#/builders/89/builds/19482](https://lab.llvm.org/buildbot/#/builders/89/builds/19482)? https://github.com/llvm/llvm-project/pull/132801 ___ cfe-commits mailing list cf

[clang] [flang] [flang] Expose -m32 and -m64 options (PR #132409)

2025-03-26 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu approved this pull request. https://github.com/llvm/llvm-project/pull/132409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Expose -m32 and -m64 options (PR #132409)

2025-03-26 Thread Tarun Prabhu via cfe-commits
@@ -0,0 +1,4 @@ +! Check support of -m64. +! RUN: %flang -target i386-pc-win32 -m64 -### - %s 2>&1 | FileCheck -check-prefix=M64 %s + +! M64: "-triple" "{{[^-]+}}64-{{.*}}" tarunprabhu wrote: If the `-target` is given as `i386-*`, this should always return `x86_

[clang] [flang] [flang] Complete alignment of -x language modes with gfortran (PR #133775)

2025-03-31 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu edited https://github.com/llvm/llvm-project/pull/133775 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Added driver options for arrays repacking. (PR #134002)

2025-04-04 Thread Tarun Prabhu via cfe-commits
@@ -0,0 +1,27 @@ +! Test forwarding just the forwarding of -frepack-arrays-contiguity options: +! RUN: %flang -frepack-arrays-contiguity=whole %s -### -fsyntax-only 2>&1 | FileCheck --check-prefix=WHOLECMD %s +! RUN: %flang -frepack-arrays-contiguity=innermost %s -### -fsyntax-on

<    1   2   3