[clang] [flang] Revert "[clang][flang] Support -time in both clang and flang" (PR #115955)

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

[clang] [flang] Revert "[clang][flang] Support -time in both clang and flang" (PR #115955)

2024-11-12 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu created https://github.com/llvm/llvm-project/pull/115955 Reverts llvm/llvm-project#109165 This created a buildbot failure on [Fuchsia](https://lab.llvm.org/buildbot/#/builders/11/builds/8080). >From 86e5163d2403cebb179815ea8ee012f13d273efd Mon Sep 17 00:00:00 20

[clang] [flang] [clang][flang] Support -time in both clang and flang (PR #109165)

2024-11-10 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: Gentle ping, @MaskRay https://github.com/llvm/llvm-project/pull/109165 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [clang][flang] Support -time in both clang and flang (PR #109165)

2024-11-12 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: Thank you all for the reviews. https://github.com/llvm/llvm-project/pull/109165 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [clang][flang] Support -time in both clang and flang (PR #109165)

2024-11-12 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu updated https://github.com/llvm/llvm-project/pull/109165 >From 11ee94ed124941fdbd70a1ea46021fa6618d2582 Mon Sep 17 00:00:00 2001 From: Tarun Prabhu Date: Wed, 18 Sep 2024 09:49:26 -0600 Subject: [PATCH 1/7] [clang][flang] Support -time in both clang and flang The

[clang] [flang] [clang][flang] Support -time in both clang and flang (PR #109165)

2024-09-18 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: The buildkite is failing on Windows because `flang` does not print anything on Windows. It is not clear to me why this is the case. I do not have access to a windows machine on which to debug this. The test, `time.f90` has been disabled on Windows with a comment explaining w

[clang] [flang] [flang][Driver] Support -fdiagnostics-color (PR #109210)

2024-09-18 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu created https://github.com/llvm/llvm-project/pull/109210 Add support for -fdiagnostics-color and -fdiagnostics-color=. Add documentation for -fdiagnostics-color= which should also be visible in clang. Partially addresses requests in #89888 >From c5c827ab2c65da7b

[clang] [flang] [clang][flang] Support -time in both clang and flang (PR #109165)

2024-09-23 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu updated https://github.com/llvm/llvm-project/pull/109165 >From 9bb43511fc688501730eeff0bec882d05d286278 Mon Sep 17 00:00:00 2001 From: Tarun Prabhu Date: Wed, 18 Sep 2024 09:49:26 -0600 Subject: [PATCH 1/2] [clang][flang] Support -time in both clang and flang The

[clang] [flang] [clang][flang] Support -time in both clang and flang (PR #109165)

2024-09-23 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu updated https://github.com/llvm/llvm-project/pull/109165 >From 9bb43511fc688501730eeff0bec882d05d286278 Mon Sep 17 00:00:00 2001 From: Tarun Prabhu Date: Wed, 18 Sep 2024 09:49:26 -0600 Subject: [PATCH 1/4] [clang][flang] Support -time in both clang and flang The

[clang] [flang] [clang][flang] Support -time in both clang and flang (PR #109165)

2024-09-23 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu updated https://github.com/llvm/llvm-project/pull/109165 >From 9bb43511fc688501730eeff0bec882d05d286278 Mon Sep 17 00:00:00 2001 From: Tarun Prabhu Date: Wed, 18 Sep 2024 09:49:26 -0600 Subject: [PATCH 1/3] [clang][flang] Support -time in both clang and flang The

[clang] [flang] [clang][flang] Support -time in both clang and flang (PR #109165)

2024-09-23 Thread Tarun Prabhu via cfe-commits
@@ -0,0 +1,24 @@ +// The -time option prints timing information for the various subcommands in a +// format similar to that used by gcc. When compiling and linking, this will +// include the time to call clang-${LLVM_VERSION_MAJOR} and the linker. Since +// the name of the linker

[clang] [flang] [clang][flang] Support -time in both clang and flang (PR #109165)

2024-09-23 Thread Tarun Prabhu via cfe-commits
@@ -0,0 +1,24 @@ +// The -time option prints timing information for the various subcommands in a +// format similar to that used by gcc. When compiling and linking, this will +// include the time to call clang-${LLVM_VERSION_MAJOR} and the linker. Since +// the name of the linker

[clang] [flang] [mlir] [clang][flang][mlir] Reapply "Support -frecord-command-line option (#102975)" (PR #110132)

2024-09-26 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu created https://github.com/llvm/llvm-project/pull/110132 The underlying issue was caused by a file included in two different places which resulted in duplicate definition errors when linking individual shared libraries. This was fixed in c3201ddaeac02a2c86a38b [#

[clang] [flang] [flang][Driver] Support -fdiagnostics-color (PR #109210)

2024-09-26 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: Thanks for the review, @MaskRay. @tblah, @kiranchandramohan, does this look ok to you? https://github.com/llvm/llvm-project/pull/109210 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [flang] [flang][Driver] Support -fdiagnostics-color (PR #109210)

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

[clang] [flang] [mlir] [clang][flang][mlir] Support -frecord-command-line option (PR #102975)

2024-09-19 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu updated https://github.com/llvm/llvm-project/pull/102975 >From f0801cb9e3caeb41a078bc091b9ed624695c83e4 Mon Sep 17 00:00:00 2001 From: Tarun Prabhu Date: Mon, 12 Aug 2024 14:32:08 -0600 Subject: [PATCH 1/6] [clang][flang][mlir] Support -frecord-command-line option

[clang] [flang] [mlir] [clang][flang][mlir] Support -frecord-command-line option (PR #102975)

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

[clang] [flang] [clang][flang] Support -time in both clang and flang (PR #109165)

2024-09-18 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu created https://github.com/llvm/llvm-project/pull/109165 The -time option prints timing information for the subcommands (compiler, linker) in a format similar to that used by gcc/gfortran (we use more digits of precision). This partially addresses requests from

[clang] [flang] [flang][Driver] Support -fdiagnostics-color (PR #109210)

2024-09-19 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: > Is `-fdiagnostics-color=auto` too host-environment dependent to test? I am not sure how I could reliably test it across platforms. One way to do it on Unix could be ``` $ flang -### -diagnostics-color=auto %s | grep -Eqv '"-fc1".+"-fcolor-diagnostics"' ``` The pipe to g

[clang] [flang] [flang][Driver] Support -fdiagnostics-color (PR #109210)

2024-09-19 Thread Tarun Prabhu via cfe-commits
@@ -732,6 +732,12 @@ void Flang::ConstructJob(Compilation &C, const JobAction &JA, // to avoid warn_drv_unused_argument. Args.getLastArg(options::OPT_fcolor_diagnostics, options::OPT_fno_color_diagnostics); + if (const Arg *A = Args.getLastArg(options::O

[clang] [flang] [mlir] [clang][flang][mlir] Support -frecord-command-line option (PR #102975)

2024-09-20 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: Thanks for the instructions on how to reproduce. I'll take a look. https://github.com/llvm/llvm-project/pull/102975 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] Support -fdiagnostics-color (PR #109210)

2024-09-19 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu updated https://github.com/llvm/llvm-project/pull/109210 >From c5c827ab2c65da7b5fa04a2906d3d03d3dbfc508 Mon Sep 17 00:00:00 2001 From: Tarun Prabhu Date: Wed, 18 Sep 2024 16:12:36 -0600 Subject: [PATCH 1/2] [flang][Driver] Support -fdiagnostics-color Add support

[clang] [flang] [mlir] [clang][flang][mlir] Support -frecord-command-line option (PR #102975)

2024-09-19 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: > As you are renaming functions, you can fix the function naming style > `tools::function` instead of `tools::Function`. While the style is largely > inconsistent, we usually fix the style while renaming functions. I will do that and merge. Thanks! https://github.com/llvm/l

[clang] [flang] [mlir] [clang][flang][mlir] Support -frecord-command-line option (PR #102975)

2024-09-19 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: @MaskRay, If everything looks good to you now, could you approve this? I apologize for being pushy, but this will help us get moving on some other things in `flang`. Thanks. https://github.com/llvm/llvm-project/pull/102975 ___ cfe

[clang] [flang] [clang][flang] Support -time in both clang and flang (PR #109165)

2024-09-18 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu updated https://github.com/llvm/llvm-project/pull/109165 >From 678fddafe35cec58de50b59354bc82a58bb47534 Mon Sep 17 00:00:00 2001 From: Tarun Prabhu Date: Wed, 18 Sep 2024 09:49:26 -0600 Subject: [PATCH 1/2] [clang][flang] Support -time in both clang and flang The

[clang] [flang] [mlir] [clang][flang][mlir] Support -frecord-command-line option (PR #102975)

2024-09-19 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu updated https://github.com/llvm/llvm-project/pull/102975 >From 4a37cec543f30bb122bf14573fdec8302a0afa3e Mon Sep 17 00:00:00 2001 From: Tarun Prabhu Date: Mon, 12 Aug 2024 14:32:08 -0600 Subject: [PATCH 1/6] [clang][flang][mlir] Support -frecord-command-line option

[clang] [flang] [mlir] [clang][flang][mlir] Support -frecord-command-line option (PR #102975)

2024-09-25 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: The underlying issue is due to `CLOptions.inc` being included in `FrontendActions.cpp` and `bbc.cpp`. The file contained a number of command line options and functions, all of which were declared `static`. This PR added `libflangFrontend` to the list of libraries linked into

[clang] [flang] [flang][Driver] Add support for -f[no-]wrapv and -f[no]-strict-overflow in the frontend (PR #110061)

2024-10-03 Thread Tarun Prabhu via cfe-commits
@@ -0,0 +1,10 @@ +! Test for correct forwarding of integer overflow flags from the compiler driver +! to the frontend driver + +! RUN: %flang -### -fno-strict-overflow %s 2>&1 | FileCheck %s --check-prefixes CHECK,INDUCED tarunprabhu wrote: Do we need both the

[clang] [flang] [flang][Driver] Add support for -f[no-]wrapv and -f[no]-strict-overflow in the frontend (PR #110061)

2024-10-03 Thread Tarun Prabhu via cfe-commits
@@ -866,6 +866,17 @@ void Flang::ConstructJob(Compilation &C, const JobAction &JA, } } + // -fno-strict-overflow implies -fwrapv if it isn't disabled, but + // -fstrict-overflow won't turn off an explicitly enabled -fwrapv. + if (Arg *A = Args.getLastArg(options::OPT

[clang] [flang] [flang][Driver] Add support for -f[no-]wrapv and -f[no]-strict-overflow in the frontend (PR #110061)

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

[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
@@ -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
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,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] [mlir] [clang][flang][mlir] Support -frecord-command-line option (PR #102975)

2024-09-17 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu updated https://github.com/llvm/llvm-project/pull/102975 >From 4a37cec543f30bb122bf14573fdec8302a0afa3e Mon Sep 17 00:00:00 2001 From: Tarun Prabhu Date: Mon, 12 Aug 2024 14:32:08 -0600 Subject: [PATCH 1/5] [clang][flang][mlir] Support -frecord-command-line option

[clang] [flang] [mlir] [clang][flang][mlir] Support -frecord-command-line option (PR #102975)

2024-09-17 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: Moved code to the `clang::driver::tools` namespace https://github.com/llvm/llvm-project/pull/102975 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-09-17 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu closed https://github.com/llvm/llvm-project/pull/108868 ___ 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-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] [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] [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] [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] [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
@@ -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] [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] [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] 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] [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-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] [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][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] [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
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
@@ -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][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-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 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-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

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

2024-11-21 Thread Tarun Prabhu via cfe-commits
@@ -0,0 +1,43 @@ +! Test --print-supported-cpus and associated aliases, -mcpu=help and +! -mtune=help + +! RUN: %if x86-registered-target %{ \ +! RUN: %flang --target=x86_64-unknown-linux-gnu --print-supported-cpus 2>&1 \ +! RUN: | FileCheck %s --check-prefixes=X86,CHECK \ +

[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/2] [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 created https://github.com/llvm/llvm-project/pull/117199 The aliases are -mcpu=help and -mtune=help. There is still an issue with the output which prints an example line that references clang. That is not fixed here because it is printed in llvm/MC/SubtargetInfo.

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

2024-11-21 Thread Tarun Prabhu via cfe-commits
@@ -4417,7 +4417,8 @@ void Driver::BuildActions(Compilation &C, DerivedArgList &Args, // Use the -mcpu=? flag as the dummy input to cc1. Actions.clear(); - Action *InputAc = C.MakeAction(*A, types::TY_C); + Action *InputAc = C.MakeAction( + *A,

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

<    1   2   3   >