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

2025-02-12 Thread Kiran Chandramohan via cfe-commits
@@ -0,0 +1,380 @@ + + +# `DO CONCURENT` 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 ho

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

2025-02-12 Thread Kiran Chandramohan via cfe-commits
@@ -6919,6 +6919,10 @@ defm loop_versioning : BoolOptionWithoutMarshalling<"f", "version-loops-for-stri def fhermetic_module_files : Flag<["-"], "fhermetic-module-files">, Group, HelpText<"Emit hermetic module files (no nested USE association)">; + +def do_concurrent_to_op

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

2025-02-12 Thread Kiran Chandramohan via cfe-commits
@@ -0,0 +1,380 @@ + + +# `DO CONCURENT` 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 ho

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

2025-02-12 Thread Kiran Chandramohan via cfe-commits
@@ -0,0 +1,380 @@ + + +# `DO CONCURENT` 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 ho

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

2025-02-12 Thread Kiran Chandramohan via cfe-commits
@@ -0,0 +1,380 @@ + + +# `DO CONCURENT` 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 ho

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

2025-02-12 Thread Kiran Chandramohan via cfe-commits
@@ -0,0 +1,380 @@ + + +# `DO CONCURENT` 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 ho

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

2025-02-12 Thread Kiran Chandramohan via cfe-commits
@@ -6919,6 +6919,10 @@ defm loop_versioning : BoolOptionWithoutMarshalling<"f", "version-loops-for-stri def fhermetic_module_files : Flag<["-"], "fhermetic-module-files">, Group, HelpText<"Emit hermetic module files (no nested USE association)">; + +def do_concurrent_to_op

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

2025-02-12 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan commented: Some minor comments. 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-12 Thread Kiran Chandramohan via cfe-commits
@@ -0,0 +1,380 @@ + + +# `DO CONCURENT` 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 ho

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

2025-02-12 Thread Kiran Chandramohan via cfe-commits
@@ -0,0 +1,380 @@ + + +# `DO CONCURENT` 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 ho

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

2025-02-12 Thread Kiran Chandramohan via cfe-commits
@@ -0,0 +1,380 @@ + + +# `DO CONCURENT` mapping to OpenMP kiranchandramohan wrote: ```suggestion # `DO CONCURRENT` mapping to OpenMP ``` https://github.com/llvm/llvm-project/pull/126026 ___ cfe-commits mailing list cfe

[clang] [flang] [flang] Support -f[no-]realloc-lhs. (PR #120165)

2024-12-17 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. LG. Thanks. Just a comment, no action required. I see some hits for realloc-lhs in the gfortran testsuite. Will some of these tests start behaving differently? ``` CMakeLists.txt: -fno-realloc-lhs CMakeLists.txt: -Wrealloc-lhs

[clang] [flang] Ignore -f[no-]realloc-lhs. (PR #120320)

2024-12-17 Thread Kiran Chandramohan via cfe-commits
@@ -3465,7 +3465,7 @@ defm diagnostics_show_line_numbers : BoolFOption<"diagnostics-show-line-numbers" PosFlag>; def fno_realloc_lhs : Flag<["-"], "fno-realloc-lhs">, Group, HelpText<"An allocatable left-hand side of an intrinsic assignment is assumed to be allocated and

[clang] [flang] Ignore -f[no-]realloc-lhs. (PR #120320)

2024-12-17 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan commented: > After https://github.com/llvm/llvm-project/pull/120165 clang started > complaining about unknown option -f[no-]realloc-lhs. Was this on an existing test? https://github.com/llvm/llvm-project/pull/120320 _

[clang] [flang] Ignore -f[no-]realloc-lhs. (PR #120320)

2024-12-17 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan edited https://github.com/llvm/llvm-project/pull/120320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] Ignore -f[no-]realloc-lhs. (PR #120320)

2024-12-17 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: > > > After #120165 clang started complaining about unknown option > > > -f[no-]realloc-lhs. > > > > > > Was this on an existing test? > > I noticed it when trying to compile a Fortran/C mix test where flang/clang > were used as compilers and I passed `-fno-realloc-l

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

2024-12-17 Thread Kiran Chandramohan via cfe-commits
@@ -2276,7 +2281,8 @@ void OmpAttributeVisitor::Post(const parser::Name &name) { if (Symbol * found{currScope().FindSymbol(name.source)}) { if (symbol != found) { name.symbol = found; // adjust the symbol within region -} else if (GetContext().de

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

2024-12-17 Thread Kiran Chandramohan 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-18 Thread Kiran Chandramohan via cfe-commits
@@ -2276,7 +2281,8 @@ void OmpAttributeVisitor::Post(const parser::Name &name) { if (Symbol * found{currScope().FindSymbol(name.source)}) { if (symbol != found) { name.symbol = found; // adjust the symbol within region -} else if (GetContext().de

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

2024-12-18 Thread Kiran Chandramohan via cfe-commits
@@ -2276,7 +2281,8 @@ void OmpAttributeVisitor::Post(const parser::Name &name) { if (Symbol * found{currScope().FindSymbol(name.source)}) { if (symbol != found) { name.symbol = found; // adjust the symbol within region -} else if (GetContext().de

[clang] [flang] [llvm] seq_cst is allowed in Flush since OpenMP 5.1. (PR #114072)

2024-11-21 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: > > > > Thanks for this patch. Could you update the title/summary of the patch > > > > to say that seq_cst is allowed in Flush since OpenMP 5.1. Also, might > > > > make sense to say why no other changes in Lowering to IR is required. > > > > Could you add a test in fla

[clang] [flang] [llvm] seq_cst is allowed in Flush since OpenMP 5.1. (PR #114072)

2024-11-21 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. LG. Please add the test I suggested. Please wait for @alexey-bataev https://github.com/llvm/llvm-project/pull/114072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

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

2025-01-08 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan updated https://github.com/llvm/llvm-project/pull/122144 >From 483501549b910d1e91dab05cce65793c44aaa6f6 Mon Sep 17 00:00:00 2001 From: Kiran Chandramohan Date: Wed, 8 Jan 2025 17:26:24 + Subject: [PATCH] [Flang][Driver] Add a flag to control zero initial

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

2025-01-08 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: > LGTM. Thanks Kiran. Is the name of the flag alrite? 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][Driver] Add a flag to control zero initialization of global v… (PR #122144)

2025-01-08 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan created https://github.com/llvm/llvm-project/pull/122144 …ariables Patch adds a flag to control zero initialization of global variables without default initialization. The default is to zero initialize. >From c4ecdf68662329811e22e4a471c393ea5981785a Mon Se

[clang] [flang] Reland "[Flang][Driver] Add a flag to control zero initialization" (PR #123606)

2025-01-20 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan closed https://github.com/llvm/llvm-project/pull/123606 ___ 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-23 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. LG. Thanks Jean. Do you need a `bbc` option? https://github.com/llvm/llvm-project/pull/124110 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

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

2025-01-24 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan closed 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] Reland "[Flang][Driver] Add a flag to control zero initialization" (PR #123606)

2025-01-20 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan created https://github.com/llvm/llvm-project/pull/123606 Reverts llvm/llvm-project#123330 >From ddb9cc530ec0667c3b4207d13bc6ec26f64241d4 Mon Sep 17 00:00:00 2001 From: Kiran Chandramohan Date: Mon, 20 Jan 2025 12:43:24 + Subject: [PATCH] =?UTF-8?q?Rever

[clang] [flang] Reland "[Flang][Driver] Add a flag to control zero initialization" (PR #123606)

2025-01-20 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan updated https://github.com/llvm/llvm-project/pull/123606 >From ddb9cc530ec0667c3b4207d13bc6ec26f64241d4 Mon Sep 17 00:00:00 2001 From: Kiran Chandramohan Date: Mon, 20 Jan 2025 12:43:24 + Subject: [PATCH 1/2] =?UTF-8?q?Revert=20"Revert=20"Revert=20"Rever

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

2025-01-13 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: > -fno-init-global-zero Thanks @tarunprabhu @jeanPerier, Changed to `fno-init-global-zero` and also added a positive version`-fno-init-global-zero`. https://github.com/llvm/llvm-project/pull/122144 ___ cfe-commits mailing lis

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

2025-01-13 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan updated https://github.com/llvm/llvm-project/pull/122144 >From 483501549b910d1e91dab05cce65793c44aaa6f6 Mon Sep 17 00:00:00 2001 From: Kiran Chandramohan Date: Wed, 8 Jan 2025 17:26:24 + Subject: [PATCH 1/2] [Flang][Driver] Add a flag to control zero ini

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

2025-01-14 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan updated https://github.com/llvm/llvm-project/pull/122144 >From 483501549b910d1e91dab05cce65793c44aaa6f6 Mon Sep 17 00:00:00 2001 From: Kiran Chandramohan Date: Wed, 8 Jan 2025 17:26:24 + Subject: [PATCH 1/3] [Flang][Driver] Add a flag to control zero ini

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

2025-01-14 Thread Kiran Chandramohan via cfe-commits
@@ -3494,6 +3494,12 @@ def fno_struct_path_tbaa : Flag<["-"], "fno-struct-path-tbaa">, Group; def fno_strict_enums : Flag<["-"], "fno-strict-enums">, Group; def fno_strict_overflow : Flag<["-"], "fno-strict-overflow">, Group, Visibility<[ClangOption, FlangOption]>; +defm ini

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

2025-01-13 Thread Kiran Chandramohan via cfe-commits
@@ -3494,6 +3494,9 @@ def fno_struct_path_tbaa : Flag<["-"], "fno-struct-path-tbaa">, Group; def fno_strict_enums : Flag<["-"], "fno-strict-enums">, Group; def fno_strict_overflow : Flag<["-"], "fno-strict-overflow">, Group, Visibility<[ClangOption, FlangOption]>; +def fno_z

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

2025-01-14 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan updated https://github.com/llvm/llvm-project/pull/122144 >From 483501549b910d1e91dab05cce65793c44aaa6f6 Mon Sep 17 00:00:00 2001 From: Kiran Chandramohan Date: Wed, 8 Jan 2025 17:26:24 + Subject: [PATCH 1/5] [Flang][Driver] Add a flag to control zero ini

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

2025-01-14 Thread Kiran Chandramohan via cfe-commits
@@ -150,12 +150,17 @@ void Flang::addCodegenOptions(const ArgList &Args, if (shouldLoopVersion(Args)) CmdArgs.push_back("-fversion-loops-for-stride"); + Args.addAllArgs(CmdArgs, {options::OPT_flang_experimental_hlfir, +options::OPT_flang_depr

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

2025-01-14 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan updated https://github.com/llvm/llvm-project/pull/122144 >From 483501549b910d1e91dab05cce65793c44aaa6f6 Mon Sep 17 00:00:00 2001 From: Kiran Chandramohan Date: Wed, 8 Jan 2025 17:26:24 + Subject: [PATCH 1/5] [Flang][Driver] Add a flag to control zero ini

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

2025-01-14 Thread Kiran Chandramohan via cfe-commits
@@ -0,0 +1,37 @@ +! RUN: %flang_fc1 -emit-llvm -O1 -funroll-loops -mllvm -force-vector-width=2 -o- %s | FileCheck %s --check-prefixes=CHECK,UNROLL +! RUN: %flang_fc1 -emit-llvm -O2 -mllvm -force-vector-width=2 -o- %s | FileCheck %s --check-prefixes=CHECK,UNROLL +! RUN: %flang_fc

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

2025-01-14 Thread Kiran Chandramohan via cfe-commits
@@ -0,0 +1,37 @@ +! RUN: %flang_fc1 -emit-llvm -O1 -funroll-loops -mllvm -force-vector-width=2 -o- %s | FileCheck %s --check-prefixes=CHECK,UNROLL +! RUN: %flang_fc1 -emit-llvm -O2 -mllvm -force-vector-width=2 -o- %s | FileCheck %s --check-prefixes=CHECK,UNROLL +! RUN: %flang_fc

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

2025-01-14 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan updated https://github.com/llvm/llvm-project/pull/122144 >From 483501549b910d1e91dab05cce65793c44aaa6f6 Mon Sep 17 00:00:00 2001 From: Kiran Chandramohan Date: Wed, 8 Jan 2025 17:26:24 + Subject: [PATCH 1/4] [Flang][Driver] Add a flag to control zero ini

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

2025-01-14 Thread Kiran Chandramohan 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 kiranchandramohan wrote: The test should probably be in Integration directory and possibly a source to LLVM IR te

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

2025-01-14 Thread Kiran Chandramohan via cfe-commits
@@ -150,12 +150,17 @@ void Flang::addCodegenOptions(const ArgList &Args, if (shouldLoopVersion(Args)) CmdArgs.push_back("-fversion-loops-for-stride"); + Args.addAllArgs(CmdArgs, {options::OPT_flang_experimental_hlfir, +options::OPT_flang_depr

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

2025-01-14 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan updated https://github.com/llvm/llvm-project/pull/122144 >From 483501549b910d1e91dab05cce65793c44aaa6f6 Mon Sep 17 00:00:00 2001 From: Kiran Chandramohan Date: Wed, 8 Jan 2025 17:26:24 + Subject: [PATCH 1/4] [Flang][Driver] Add a flag to control zero ini

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

2025-01-14 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan edited https://github.com/llvm/llvm-project/pull/122906 ___ 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 Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan updated https://github.com/llvm/llvm-project/pull/101701 >From b33ae618fafdad93660eb31368a462e728a2cff9 Mon Sep 17 00:00:00 2001 From: Kiran Chandramohan Date: Fri, 19 Jul 2024 12:46:08 + Subject: [PATCH 1/2] [Flang][Driver] Deprecate Ofast --- clang/i

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

2025-01-15 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan updated https://github.com/llvm/llvm-project/pull/122144 >From 483501549b910d1e91dab05cce65793c44aaa6f6 Mon Sep 17 00:00:00 2001 From: Kiran Chandramohan Date: Wed, 8 Jan 2025 17:26:24 + Subject: [PATCH 1/7] [Flang][Driver] Add a flag to control zero ini

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

2025-01-15 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: I did not see any opposition in https://discourse.llvm.org/t/rfc-deprecate-ofast-in-flang/80243. So would like to land this before llvm 20. https://github.com/llvm/llvm-project/pull/101701 ___ cfe-commits mailing list cfe-com

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

2025-01-15 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan updated https://github.com/llvm/llvm-project/pull/122144 >From 483501549b910d1e91dab05cce65793c44aaa6f6 Mon Sep 17 00:00:00 2001 From: Kiran Chandramohan Date: Wed, 8 Jan 2025 17:26:24 + Subject: [PATCH 1/6] [Flang][Driver] Add a flag to control zero ini

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

2025-01-14 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan updated https://github.com/llvm/llvm-project/pull/122144 >From 483501549b910d1e91dab05cce65793c44aaa6f6 Mon Sep 17 00:00:00 2001 From: Kiran Chandramohan Date: Wed, 8 Jan 2025 17:26:24 + Subject: [PATCH 1/5] [Flang][Driver] Add a flag to control zero ini

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

2025-01-16 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: Thanks @jeanPerier @tarunprabhu. I have created https://github.com/llvm/llvm-project/pull/123215 to use a temporary directory for the test. I will keep the bbc option in this patch as well. https://github.com/llvm/llvm-project/pull/123097 _

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

2025-01-16 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan updated https://github.com/llvm/llvm-project/pull/123097 >From a58bb993f00f65ff4f4500b10c16939857ed25a0 Mon Sep 17 00:00:00 2001 From: Kiran Chandramohan Date: Wed, 15 Jan 2025 17:33:00 + Subject: [PATCH] =?UTF-8?q?Revert=20"Revert=20"[Flang][Driver]=20A

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

2025-01-17 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan updated https://github.com/llvm/llvm-project/pull/123097 >From a58bb993f00f65ff4f4500b10c16939857ed25a0 Mon Sep 17 00:00:00 2001 From: Kiran Chandramohan Date: Wed, 15 Jan 2025 17:33:00 + Subject: [PATCH] =?UTF-8?q?Revert=20"Revert=20"[Flang][Driver]=20A

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

2025-01-17 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan closed https://github.com/llvm/llvm-project/pull/123097 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-01-17 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan closed https://github.com/llvm/llvm-project/pull/123330 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-01-17 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan created https://github.com/llvm/llvm-project/pull/123330 Reverts llvm/llvm-project#123097 Reverting due to buildbot failure https://lab.llvm.org/buildbot/#/builders/89/builds/14577. >From 790a6e1399ee90ae802878dcb00c0e2a1d464d69 Mon Sep 17 00:00:00 2001 F

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

2025-01-17 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: Thanks @jeanPerier for looking into this in detail. That makes sense. I have https://github.com/llvm/llvm-project/pull/123364 to make the changes for `module_use.f90`. https://github.com/llvm/llvm-project/pull/123330 ___ cfe-

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

2025-01-15 Thread Kiran Chandramohan via cfe-commits
@@ -933,10 +933,12 @@ def O : Joined<["-"], "O">, Group, def O_flag : Flag<["-"], "O">, Visibility<[ClangOption, CC1Option, FC1Option]>, Alias, AliasArgs<["1"]>; def Ofast : Joined<["-"], "Ofast">, Group, - Visibility<[ClangOption, CC1Option, FlangOption]>, - HelpTextForVar

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

2025-01-15 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan closed 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] Revert "[Flang][Driver] Add a flag to control zero initialization of global v…" (PR #123067)

2025-01-15 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan created https://github.com/llvm/llvm-project/pull/123067 Reverts llvm/llvm-project#122144 Reverting due to CI failure https://lab.llvm.org/buildbot/#/builders/89/builds/14422 >From c2e833476d5a2ceb0c9dabe7bd6e206c01f5ce1f Mon Sep 17 00:00:00 2001 From: Kir

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

2025-01-15 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan closed https://github.com/llvm/llvm-project/pull/123067 ___ 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 Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: Apologies for the churn here. But the previous patch (https://github.com/llvm/llvm-project/pull/122144) was causing some non-deterministic failures in `flang/test/Lower/module_use.f90`. I am assuming this is because the LoweringOpt is not set to a reasonable value in t

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

2025-01-15 Thread Kiran Chandramohan via cfe-commits
@@ -0,0 +1,37 @@ +! RUN: %flang_fc1 -emit-llvm -O1 -funroll-loops -mllvm -force-vector-width=2 -o- %s | FileCheck %s --check-prefixes=CHECK,UNROLL +! RUN: %flang_fc1 -emit-llvm -O2 -mllvm -force-vector-width=2 -o- %s | FileCheck %s --check-prefixes=CHECK,UNROLL +! RUN: %flang_fc

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

2025-01-15 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. LG. https://github.com/llvm/llvm-project/pull/122906 ___ 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 Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan created https://github.com/llvm/llvm-project/pull/123097 …tion of global v…" (#123067)" This reverts commit 44ba43aa2b740878d83a9d6f1d52a333c0d48c22. Adds the flag to bbc as well. >From 00a272bef8ca5e2e1593c6bfefa0956af9982ade Mon Sep 17 00:00:00 2001 From

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

2025-02-13 Thread Kiran Chandramohan via cfe-commits
@@ -352,16 +352,38 @@ bool CodeGenAction::beginSourceFileAction() { // Add OpenMP-related passes // WARNING: These passes must be run immediately after the lowering to ensure // that the FIR is correct with respect to OpenMP operations/attributes. - if (ci.getInvocation(

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

2025-02-13 Thread Kiran Chandramohan via cfe-commits
@@ -157,6 +157,34 @@ static bool parseDebugArgs(Fortran::frontend::CodeGenOptions &opts, return true; } +static bool parseDoConcurrentMapping(Fortran::frontend::CodeGenOptions &opts, kiranchandramohan wrote: The return value seems unused. https://github.c

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

2025-02-13 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan 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 Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. LG. Please wait for @skatrak 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-

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

2025-02-12 Thread Kiran Chandramohan via cfe-commits
@@ -6919,6 +6919,10 @@ defm loop_versioning : BoolOptionWithoutMarshalling<"f", "version-loops-for-stri def fhermetic_module_files : Flag<["-"], "fhermetic-module-files">, Group, HelpText<"Emit hermetic module files (no nested USE association)">; + +def do_concurrent_to_op

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

2025-02-13 Thread Kiran Chandramohan via cfe-commits
@@ -0,0 +1,20 @@ +! UNSUPPORTED: system-windows kiranchandramohan wrote: This test should be in the Driver directory. https://github.com/llvm/llvm-project/pull/126026 ___ cfe-commits mailing list cfe-commits@lists.llvm

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

2025-02-13 Thread Kiran Chandramohan via cfe-commits
@@ -0,0 +1,148 @@ + + +# `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 Kiran Chandramohan via cfe-commits
@@ -0,0 +1,99 @@ +//===- DoConcurrentConversion.cpp -- map `DO CONCURRENT` to OpenMP loops --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

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

2025-02-13 Thread Kiran Chandramohan via cfe-commits
@@ -0,0 +1,99 @@ +//===- DoConcurrentConversion.cpp -- map `DO CONCURRENT` to OpenMP loops --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

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

2025-02-13 Thread Kiran Chandramohan via cfe-commits
@@ -0,0 +1,53 @@ +! Mark as xfail for now until we upstream the relevant part. This is just for +! demo purposes at this point. Upstreaming this is the next step. +! XFAIL: * + +! Tests mapping of a basic `do concurrent` loop to `!$omp parallel do`. + +! RUN: %flang_fc1 -emit-hlfi

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

2025-02-13 Thread Kiran Chandramohan via cfe-commits
@@ -0,0 +1,99 @@ +//===- DoConcurrentConversion.cpp -- map `DO CONCURRENT` to OpenMP loops --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

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

2025-03-21 Thread Kiran Chandramohan via cfe-commits
@@ -4671,14 +4671,14 @@ def EB : Flag<["-"], "EB">, Alias; def m16 : Flag<["-"], "m16">, Group, Flags<[NoXarchOption]>, Visibility<[ClangOption, CLOption, DXCOption]>; def m32 : Flag<["-"], "m32">, Group, Flags<[NoXarchOption]>, - Visibility<[ClangOption, CLOption, DXCOption

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

2025-03-21 Thread Kiran Chandramohan via cfe-commits
@@ -0,0 +1,6 @@ +! Check support of -m32 and -m64. kiranchandramohan wrote: Can the file be renamed to be something specific about the enabled options? https://github.com/llvm/llvm-project/pull/132409 ___ cfe-commits m

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

2025-04-05 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: This patch might partially address the issue raised in https://github.com/llvm/llvm-project/issues/73180 https://github.com/llvm/llvm-project/pull/132801 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

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

2025-03-26 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: > Is this buildbot failure related: > https://lab.llvm.org/buildbot/#/builders/89/builds/19482? Likely. We shouldn't be generating files in driver tests. For checking output, we have to pipe the output to FileCheck. https://github.com/llvm/llvm-project/pull/132801 ___

[clang] [flang] [flang] Expose -m64 option (PR #132409)

2025-03-27 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. LG. 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][OpenMP] Bump default OpenMP version to 3.1 (PR #133745)

2025-03-31 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. LGTM. Please wait for other reviewers. https://github.com/llvm/llvm-project/pull/133745 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [flang] Enable `-m32`, `-maix32` and `-maix64` for Flang on AIX. (PR #136202)

2025-04-20 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. LG. https://github.com/llvm/llvm-project/pull/136202 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] Add IR Profile-Guided Optimization (IR PGO) support to the Flang compiler (PR #136098)

2025-04-24 Thread Kiran Chandramohan via cfe-commits
@@ -130,6 +133,20 @@ static bool saveMLIRTempFile(const CompilerInvocation &ci, // Custom BeginSourceFileAction //===--===// + +static llvm::cl::opt ClPGOColdFuncAttr( kiranchandramohan wrote

[clang] [Flang][Sanitizer] Support sanitizer flag for Flang Driver. (PR #137759)

2025-04-29 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: Is enabling the flag sufficient? Is there additional work in the Frontend to make this flag and its options useful? https://github.com/llvm/llvm-project/pull/137759 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

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

2025-02-18 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: > If the -fd-lines-as-code option is given they are treated as if the first > column contained a blank. > If the -fd-lines-as-comments option is given, they are treated as comment > lines. Do the tests added in this patch check this behaviour? https://github.com/llvm/

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

2025-02-18 Thread Kiran Chandramohan via cfe-commits
@@ -6747,8 +6747,12 @@ 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][OpenMP] Upstream `do concurrent` loop-nest detection. (PR #127595)

2025-02-18 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: It is slightly unfortunate to rediscover the loops so early in the flow when we had it in source. Have you considered changing the representation of do_concurrent in the IR for multi-range do concurrent loops? Representation could in HLFIR capture all the loops, so the

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

2025-02-19 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: > > > If the -fd-lines-as-code option is given they are treated as if the first > > > column contained a blank. > > > If the -fd-lines-as-comments option is given, they are treated as comment > > > lines. > > > > > > Do the tests added in this patch check this behavio

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

2025-02-19 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. 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][Driver] Add support of -fd-lines-as-comments and -fd-lines-as-code flags (PR #127605)

2025-02-19 Thread Kiran Chandramohan 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] [llvm] [mlir] [mlir][OpenMP] fix crash outlining infinite loop (PR #129872)

2025-03-06 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: > @kiranchandramohan #130135 > > After a hard time getting even #114419 approved, I don't think anybody is > really interested in reviewing/fixing non-SESE regions. With cancellation > points basically not supported, I guess it doesn't matter whether this PR > breaks

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

2025-03-10 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: Thanks @JDPailleux for the patch. I have not gone into the patch in detail but would like to provide some context. In general, we aim to only depend on libClangDriver and move it to LLVM so that Flang need not depend on Clang or its libraries. If this patch increases t

[clang] [flang] [llvm] [mlir] [mlir][OpenMP] fix crash outlining infinite loop (PR #129872)

2025-03-05 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: > > The comment mentions the additional edges might come through cancellations, > > but what test actually tests cancellation points? > > There is probably no cancellation support at the moment. I remember that you > had a set of patches to enable support for that but

[clang] [flang] [llvm] [mlir] [mlir][OpenMP] fix crash outlining infinite loop (PR #129872)

2025-03-05 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: > The comment mentions the additional edges might come through cancellations, > but what test actually tests cancellation points? There is probably no cancellation support at the moment. I remember that you had a set of patches to enable support for that but never land

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

2025-02-12 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: > > Also, I don't have a very strong opinion about this, but it seems > > misleading to have the `DoConcurrentConversionToOpenMP.md` document be > > written as if all of the features in the ROCm fork were already present, > > with the last section only implying that n

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

2025-02-21 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. LG. 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][Driver] Add support of -fd-lines-as-comments and -fd-lines-as-code flags (PR #127605)

2025-02-21 Thread Kiran Chandramohan 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][OpenMP] Upstream `do concurrent` loop-nest detection. (PR #127595)

2025-02-22 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: There is a separate completeness issue as well. Currently, some do-concurrent programs with internal branches (eg below) will be treated as unstructured loops and not modelled as `fir.do_loop`. The conversion pass will miss these. So having an operation modelling do-co

[clang] [flang] [flang][OpenMP] Upstream `do concurrent` loop-nest detection. (PR #127595)

2025-02-25 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: > @kiranchandramohan @clementval thanks for your comments (and sorry for the > late response, I was off yesterday). > > Sure, we can work on a multi-range loop op in FIR, our team did not write the > current loop op definition so I was working with what I have. > > Ju

<    1   2   3   4   >