[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

[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][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] 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] 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] 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-]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] 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] 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] 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] [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][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] 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] 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] 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] 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-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
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-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] 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
@@ -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
@@ -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 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] 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 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] 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/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] 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ñ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] 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: @@ -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=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] 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][Driver] Add support of -fd-lines-as-comments and -fd-lines-as-code flags (PR #127605)

2025-02-24 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu approved this pull request. Thanks for seeing this through. https://github.com/llvm/llvm-project/pull/127605 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [flang] [flang] Align `-x f95[-cpp-input]` language modes with `gfortran` (PR #127986)

2025-02-20 Thread Tarun Prabhu via cfe-commits
=?utf-8?q?I=C3=B1aki?= Amatria Barral Message-ID: In-Reply-To: tarunprabhu wrote: This looks ok to me, but please wait for others to approve. https://github.com/llvm/llvm-project/pull/127986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [flang] [flang][Driver] Add support of -fd-lines-as-comments and -fd-lines-as-code flags (PR #127605)

2025-02-19 Thread Tarun Prabhu via cfe-commits
@@ -6747,8 +6747,16 @@ defm backtrace : BooleanFFlag<"backtrace">, Group; defm bounds_check : BooleanFFlag<"bounds-check">, Group; defm check_array_temporaries : BooleanFFlag<"check-array-temporaries">, Group; defm cray_pointer : BooleanFFlag<"cray-pointer">, Group; -defm d_l

[clang] [flang] [flang][Driver] Add support of -fd-lines-as-comments and -fd-lines-as-code flags (PR #127605)

2025-02-19 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu approved this pull request. Thanks, Jean-Didier https://github.com/llvm/llvm-project/pull/127605 ___ 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-]vectorize flags (PR #119718)

2025-02-18 Thread Tarun Prabhu via cfe-commits
@@ -3986,11 +3986,15 @@ defm assumptions : BoolFOption<"assumptions", "Disable codegen and compile-time checks for C++23's [[assume]] attribute">, PosFlag>; + +let Visibility = [ClangOption, FlangOption] in { tarunprabhu wrote: > You'd hope that

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-18 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: LGTM. Thanks. https://github.com/llvm/llvm-project/pull/126026 ___ 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-]vectorize flags (PR #119718)

2025-02-18 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu approved this pull request. LGTM. Thanks. https://github.com/llvm/llvm-project/pull/119718 ___ 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-]vectorize flags (PR #119718)

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

[clang] [flang] [flang][Driver] Add support of -fd-lines-as-comments and -fd-lines-as-code flags (PR #127605)

2025-02-18 Thread Tarun Prabhu via cfe-commits
@@ -6747,8 +6747,18 @@ defm backtrace : BooleanFFlag<"backtrace">, Group; defm bounds_check : BooleanFFlag<"bounds-check">, Group; defm check_array_temporaries : BooleanFFlag<"check-array-temporaries">, Group; defm cray_pointer : BooleanFFlag<"cray-pointer">, Group; -defm d_l

[clang] [flang] [flang][Driver] Add support of -fd-lines-as-comments and -fd-lines-as-code flags (PR #127605)

2025-02-18 Thread Tarun Prabhu via cfe-commits
@@ -957,6 +957,32 @@ static bool parseDialectArgs(CompilerInvocation &res, llvm::opt::ArgList &args, clang::DiagnosticsEngine &diags) { unsigned numErrorsBefore = diags.getNumErrors(); + // -fd-lines-as-code + if (args.hasArg(clang::driver::op

[clang] [flang] [flang][Driver] Add support of -fd-lines-as-comments and -fd-lines-as-code flags (PR #127605)

2025-02-18 Thread Tarun Prabhu via cfe-commits
@@ -957,6 +957,32 @@ static bool parseDialectArgs(CompilerInvocation &res, llvm::opt::ArgList &args, clang::DiagnosticsEngine &diags) { unsigned numErrorsBefore = diags.getNumErrors(); + // -fd-lines-as-code + if (args.hasArg(clang::driver::op

[clang] [flang] [flang][Driver] Add support of -fd-lines-as-comments and -fd-lines-as-code flags (PR #127605)

2025-02-18 Thread Tarun Prabhu via cfe-commits
@@ -6747,8 +6747,18 @@ defm backtrace : BooleanFFlag<"backtrace">, Group; defm bounds_check : BooleanFFlag<"bounds-check">, Group; defm check_array_temporaries : BooleanFFlag<"check-array-temporaries">, Group; defm cray_pointer : BooleanFFlag<"cray-pointer">, Group; -defm d_l

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

2025-02-17 Thread Tarun Prabhu via cfe-commits
@@ -3986,11 +3986,15 @@ defm assumptions : BoolFOption<"assumptions", "Disable codegen and compile-time checks for C++23's [[assume]] attribute">, PosFlag>; + +let Visibility = [ClangOption, FlangOption] in { tarunprabhu wrote: Do you know if thi

[clang] [flang] [flang][RISCV] Add target-abi ModuleFlag. (PR #126188)

2025-02-13 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu approved this pull request. Looks reasonable. Thanks. https://github.com/llvm/llvm-project/pull/126188 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-13 Thread Tarun Prabhu via cfe-commits
@@ -0,0 +1,155 @@ + + +# `DO CONCURRENT` mapping to OpenMP + +```{contents} +--- +local: +--- +``` + +This document seeks to describe the effort to parallelize `do concurrent` loops +by mapping them to OpenMP worksharing constructs. The goals of this document +are: +* Describing h

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-13 Thread Tarun Prabhu via cfe-commits
@@ -0,0 +1,155 @@ + + +# `DO CONCURRENT` mapping to OpenMP + +```{contents} +--- +local: +--- +``` + +This document seeks to describe the effort to parallelize `do concurrent` loops +by mapping them to OpenMP worksharing constructs. The goals of this document +are: +* Describing h

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-13 Thread Tarun Prabhu via cfe-commits
@@ -0,0 +1,155 @@ + + +# `DO CONCURRENT` mapping to OpenMP + +```{contents} +--- +local: +--- +``` + +This document seeks to describe the effort to parallelize `do concurrent` loops +by mapping them to OpenMP worksharing constructs. The goals of this document +are: +* Describing h

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-13 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu commented: Just some small nits https://github.com/llvm/llvm-project/pull/126026 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-13 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu edited https://github.com/llvm/llvm-project/pull/126026 ___ 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-]vectorize flags (PR #119718)

2025-02-10 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: I don't see a "processing updates" message, but the diffs look like the ones where the entire file was formatted. I'll take a look again when this gets sorted out. https://github.com/llvm/llvm-project/pull/119718 ___ cfe-commits ma

[clang] [flang] [flang] Add support for -fimplicit-none-ext option (PR #125248)

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

[clang] [flang] [flang][driver] add negative from of -fsave-main-program (PR #124110)

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

[clang] [flang] [flang][driver] add negative from of -fsave-main-program (PR #124110)

2025-01-24 Thread Tarun Prabhu via cfe-commits
@@ -6968,8 +6968,11 @@ defm unsigned : OptInFC1FFlag<"unsigned", "Enables UNSIGNED type">; def fno_automatic : Flag<["-"], "fno-automatic">, Group, HelpText<"Implies the SAVE attribute for non-automatic local objects in subprograms unless RECURSIVE">; -def fsave_main_progr

[clang] [flang] [flang][driver] add negative from of -fsave-main-program (PR #124110)

2025-01-23 Thread Tarun Prabhu via cfe-commits
@@ -6968,8 +6968,11 @@ defm unsigned : OptInFC1FFlag<"unsigned", "Enables UNSIGNED type">; def fno_automatic : Flag<["-"], "fno-automatic">, Group, HelpText<"Implies the SAVE attribute for non-automatic local objects in subprograms unless RECURSIVE">; -def fsave_main_progr

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

2025-01-23 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu requested changes to this pull request. Please move code to be shared between `clang` and `flang` to `clang/lib/Driver/ToolChains/CommonArgs.cpp` https://github.com/llvm/llvm-project/pull/119718 ___ cfe-commits mailing l

[clang] [flang] Revert "Revert "Revert "[Flang][Driver] Add a flag to control zero initializa…" (PR #123330)

2025-01-17 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: Ah, I think I mixed up `gfortran` and `flang` flags. `-J` in both is the output directory of the module. But in `gfortran`, it also causes the argument to `-J` to be added to the list of directories in which to search for modules (what `-I` usually does). I am not sure if `f

[clang] [flang] Revert "Revert "[Flang][Driver] Add a flag to control zero initializa… (PR #123097)

2025-01-15 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: > The test that fails is `flang/test/Lower/module_use.f90`. This test also > compiles another test `flang/test/Lower/module_definition.f90`. Is there an > issue with compiling the same test with modules two times and can they > interact badly? This used to be the case in Cla

[clang] [flang] [Flang][Driver] Deprecate Ofast (PR #101701)

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

[clang] [flang] [Flang][Driver] Deprecate Ofast (PR #101701)

2025-01-15 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu commented: Mimicking gfortran's behavior for now seems reasonable to me. We can always update the warning message later if needed. Thanks Kiran! https://github.com/llvm/llvm-project/pull/101701 ___ cfe-commits mailing l

[clang] [flang] [flang] Add -f[no-]unroll-loops flag (PR #122906)

2025-01-14 Thread Tarun Prabhu via cfe-commits
@@ -0,0 +1,43 @@ +// RUN: %flang_fc1 -emit-llvm -O1 -funroll-loops -mllvm -force-vector-width=1 -o- %s | FileCheck %s --check-prefixes=CHECK,UNROLL tarunprabhu wrote: A source to (at least) HLFIR test will also check that the -f(no-)unroll loops option has not

[clang] [flang] [flang][Driver] Preliminary support for -ftime-report (PR #122894)

2025-01-14 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu commented: Do you intend to make the behavior consistent with clang (by printing timing information for LLVM passes) in a separate PR? https://github.com/llvm/llvm-project/pull/122894 ___ cfe-commits mailing list cfe-com

[clang] [flang] [Flang][Driver] Add a flag to control zero initialization of global v… (PR #122144)

2025-01-08 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: Perhaps leave this up for a bit longer to see if we can think of something better. Or others may have some suggestions https://github.com/llvm/llvm-project/pull/122144 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [flang] [Flang][Driver] Add a flag to control zero initialization of global v… (PR #122144)

2025-01-08 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: > Is the name of the flag alrite? Haha. You read my mind. I spent some time thinking about it and even consulted the Fortran standard. They refer to default initialization as well, so I eventually decided that it was ok. Maybe `-fno-init-global-without-default-init` is clea

[clang] [flang] [Flang][Driver] Add a flag to control zero initialization of global v… (PR #122144)

2025-01-08 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu approved this pull request. LGTM. Thanks Kiran. https://github.com/llvm/llvm-project/pull/122144 ___ 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-]vectorize flags (PR #119718)

2025-01-08 Thread Tarun Prabhu via cfe-commits
@@ -6980,3 +6980,37 @@ void driver::applyOverrideOptions(SmallVectorImpl &Args, ++S; } } + +/// Vectorize at all optimization levels greater than 1 except for -Oz. +/// For -Oz the loop vectorizer is disabled, while the slp vectorizer is +/// enabled. +bool driver::shou

[clang] [flang] [flang][driver] add option to make all main program variable static (PR #121968)

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

[clang] [llvm] [llvm][NFC] Rework Timer.cpp globals to ensure valid lifetimes (PR #121663)

2025-01-06 Thread Tarun Prabhu via cfe-commits
@@ -38,63 +38,40 @@ using namespace llvm; -// This ugly hack is brought to you courtesy of constructor/destructor ordering -// being unspecified by C++. Basically the problem is that a Statistic object -// gets destroyed, which ends up calling 'GetLibSupportInfoOutputFile()'

[clang] [llvm] [llvm][NFC] Rework Timer.cpp globals to ensure valid lifetimes (PR #121663)

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

[clang] [llvm] [llvm][NFC] Rework Timer.cpp globals to ensure valid lifetimes (PR #121663)

2025-01-06 Thread Tarun Prabhu via cfe-commits
@@ -284,18 +250,22 @@ NamedRegionTimer::NamedRegionTimer(StringRef Name, StringRef Description, /// ctor/dtor and is protected by the TimerLock lock. static TimerGroup *TimerGroupList = nullptr; -TimerGroup::TimerGroup(StringRef Name, StringRef Description) - : Name(Name.beg

[clang] [llvm] [llvm][NFC] Rework Timer.cpp globals to ensure valid lifetimes (PR #121663)

2025-01-06 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu commented: Thanks for working on this. I have a couple of questions about inconsistent casing. Other than that, this looks reasonable to me. But I don't have a great deal of experience with this part of LLVM, so please wait for other reviewers. https://github.co

[clang] [flang] [Flang][OpenMP] Add -fopenmp-default-none command line flag (PR #120287)

2024-12-17 Thread Tarun Prabhu via cfe-commits
@@ -3596,6 +3596,9 @@ def fopenmp : Flag<["-"], "fopenmp">, Group, Flags<[NoArgumentUnused]>, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>, HelpText<"Parse OpenMP pragmas and generate parallel code.">; +def fopenmp_default_none : Flag<["-"], "fopenmp-defau

[clang] [flang] [Flang][OpenMP] Add -fopenmp-default-none command line flag (PR #120287)

2024-12-17 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu commented: On the whole, this looks reasonable. https://github.com/llvm/llvm-project/pull/120287 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [Flang][OpenMP] Add -fopenmp-default-none command line flag (PR #120287)

2024-12-17 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu edited https://github.com/llvm/llvm-project/pull/120287 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [Flang][OpenMP] Add -fopenmp-default-none command line flag (PR #120287)

2024-12-17 Thread Tarun Prabhu via cfe-commits
@@ -2268,6 +2268,11 @@ void OmpAttributeVisitor::CreateImplicitSymbols( void OmpAttributeVisitor::Post(const parser::Name &name) { auto *symbol{name.symbol}; + // if -fopenmp-default-none was given on the command line, act as if + // DEFAULT(NONE) was present at the direct

[clang] [clang-cl][flang][dxc] Fix opts exposed to clang-cl/dxc by mistake (PR #118640)

2024-12-16 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu approved this pull request. Thanks for adding the test as well. LGTM. https://github.com/llvm/llvm-project/pull/118640 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [flang] [flang][Driver] Don't require -fno-integrated-as when using -save-temps (PR #119624)

2024-12-12 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: @DavidTruby The build kite shows a failure on Windows on `Driver/pp-fixed-form.f90` with the error `flang: error: there is no external assembler that can be used on this platform` This patch forces an external assembler to be used when `-save-temps`. Is this not possible

[clang] [flang] [flang][Driver] Don't require -fno-integrated-as when using -save-temps (PR #119624)

2024-12-12 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: @banach-space, @skatrak Thank you for reviewing this. I will look into developing `fc1as`. https://github.com/llvm/llvm-project/pull/119624 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [flang] [flang][Driver] Don't require -fno-integrated-as when using -save-temps (PR #119624)

2024-12-11 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu created https://github.com/llvm/llvm-project/pull/119624 Currently, --save-temps requires -fno-integrated-as since flang does not have `fc1as` i.e. a driver for an integrated assembler. This simply checks if the driver is in flang-mode and forces useIntegratedAs(

[clang] [clang-cl][flang][dxc] Fix opts exposed to clang-cl/dxc by mistake (PR #118640)

2024-12-06 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: > > Better to double check with author who specified those CLOption. > > Do you mean the person that added `CLOption` to these flags? That was > @tarunprabhu, but IIUC that was by mistake; his intention was to extend these > flags only to Flang. That is correct, the intenti

[clang] [clang-cl][flang][dxc] Fix opts exposed to clang-cl/dxc by mistake (PR #118640)

2024-12-04 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: I checked and I don't think there are any others that have been accidentally enabled. Are there any tests that check to these options produce warnings? If not, it might be worth adding them. What do you think? https://github.com/llvm/llvm-project/pull/118640

[clang] [clang-cl][flang][dxc] Fix opts exposed to clang-cl/dxc by mistake (PR #118640)

2024-12-04 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: Thanks for this. I think you have caught all everything I changed. But I'll take another look to see if there was anything else. https://github.com/llvm/llvm-project/pull/118640 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [flang] [flang][Driver] Support -nostdlib and -nodefaultlibs (PR #108868)

2024-12-03 Thread Tarun Prabhu via cfe-commits
@@ -5572,7 +5572,8 @@ def : Flag<["-"], "nocudalib">, Alias; def gpulibc : Flag<["-"], "gpulibc">, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>, HelpText<"Link the LLVM C Library for GPUs">; def nogpulibc : Flag<["-"], "nogpulibc">, Visibility<[ClangOption, C

[clang] [flang] [flang][Driver] Support -print-supported-extensions (PR #117402)

2024-12-02 Thread Tarun Prabhu via cfe-commits
@@ -0,0 +1,34 @@ +! REQUIRES: arm-registered-target + +! RUN: %flang --target=arm-linux-gnu --print-supported-extensions 2>&1 \ +! RUN: | FileCheck --strict-whitespace --implicit-check-not=FEAT_ %s + +! CHECK: All available -march extensions for ARM tarunprabhu

[clang] [flang] [flang] Preserve fixed form in fc1 -x value (PR #117563)

2024-11-26 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: ``` if ( (a .eq. 0) .and.(b. eq. 1)) then ``` It seems like something in [9fb2db1](https://github.com/llvm/llvm-project/commit/9fb2db1e1f42ae10a9d8c1d9410b5f4e719fdac0) has caused a space to appear between `.` and `eq`. Should we be looking at what that commit did mo

[clang] [flang] [flang][Driver] Support -print-supported-extensions (PR #117402)

2024-11-26 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu edited https://github.com/llvm/llvm-project/pull/117402 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] Support -print-supported-extensions (PR #117402)

2024-11-26 Thread Tarun Prabhu via cfe-commits
@@ -0,0 +1,34 @@ +! REQUIRES: arm-registered-target + +! RUN: %flang --target=arm-linux-gnu --print-supported-extensions 2>&1 \ +! RUN: | FileCheck --strict-whitespace --implicit-check-not=FEAT_ %s + +! CHECK: All available -march extensions for ARM tarunprabhu

[clang] [flang] [flang][Driver] Support -print-supported-extensions (PR #117402)

2024-11-26 Thread Tarun Prabhu via cfe-commits
@@ -0,0 +1,10 @@ +! Test that --print-supported-extensions errors on unsupported architectures. + +! REQUIRES: x86-registered-target + +! RUN: not %flang --target=x86_64-linux-gnu --print-supported-extensions \ +! RUN: 2>&1 | FileCheck %s tarunprabhu wrote: As

[clang] [flang] [flang][Driver] Support -print-supported-extensions (PR #117402)

2024-11-22 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu created https://github.com/llvm/llvm-project/pull/117402 The implementation is pretty straightforward. The tests mirror those in clang. >From cd8f7f1cd265b38e5854f42e6141cd0e6160201f Mon Sep 17 00:00:00 2001 From: Tarun Prabhu Date: Thu, 21 Nov 2024 11:42:46 -070

[clang] [flang] [flang][Driver] Support -print-supported-cpus and associated aliases (PR #117199)

2024-11-22 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu closed https://github.com/llvm/llvm-project/pull/117199 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] Support -print-supported-cpus and associated aliases (PR #117199)

2024-11-22 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu updated https://github.com/llvm/llvm-project/pull/117199 >From 664a0c58fc98725f89e544dd9bfcb5ab22bdf04e Mon Sep 17 00:00:00 2001 From: Tarun Prabhu Date: Thu, 21 Nov 2024 09:53:49 -0700 Subject: [PATCH 1/6] [flang][Driver] Support -print-supported-cpus and associ

[clang] [flang] [flang][Driver] Support -print-supported-cpus and associated aliases (PR #117199)

2024-11-22 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu updated https://github.com/llvm/llvm-project/pull/117199 >From 664a0c58fc98725f89e544dd9bfcb5ab22bdf04e Mon Sep 17 00:00:00 2001 From: Tarun Prabhu Date: Thu, 21 Nov 2024 09:53:49 -0700 Subject: [PATCH 1/5] [flang][Driver] Support -print-supported-cpus and associ

[clang] [flang] [flang][Driver] Support -print-supported-cpus and associated aliases (PR #117199)

2024-11-21 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu updated https://github.com/llvm/llvm-project/pull/117199 >From a7d176ed8c7aa9d22944600a301fb690b845935d Mon Sep 17 00:00:00 2001 From: Tarun Prabhu Date: Thu, 21 Nov 2024 09:53:49 -0700 Subject: [PATCH 1/4] [flang][Driver] Support -print-supported-cpus and associ

[clang] [flang] [flang][Driver] Support -print-supported-cpus and associated aliases (PR #117199)

2024-11-21 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu updated https://github.com/llvm/llvm-project/pull/117199 >From a7d176ed8c7aa9d22944600a301fb690b845935d Mon Sep 17 00:00:00 2001 From: Tarun Prabhu Date: Thu, 21 Nov 2024 09:53:49 -0700 Subject: [PATCH 1/5] [flang][Driver] Support -print-supported-cpus and associ

  1   2   3   >