[clang] [flang] [flang][driver] Support -gdwarf-N option. (PR #158314)

2025-09-20 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj commented: Hi @abidh , Thank you for the change. LGTM except the default visibility change. However, merging this change alone would mean flang would be accepting this option without any indication that it is not handled. It would be nice if - In Flang.cpp, you can

[clang] [flang] [flang][Driver] Enables lto-partitions and fat-lto-object. (PR #158125)

2025-09-20 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj edited https://github.com/llvm/llvm-project/pull/158125 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] Enables lto-partitions and fat-lto-object. (PR #158125)

2025-09-20 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/158125 >From 52c30555a62b8b6937af2f269ad88bbb25577881 Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Tue, 2 Sep 2025 12:34:06 -0500 Subject: [PATCH] [flang][Driver] Enables lto-partitions and fat-lto-object. lt

[clang] [flang] [flang][Driver] Enables lto-partitions and fat-lto-object. (PR #158125)

2025-09-20 Thread Anchu Rajendran S via cfe-commits
@@ -182,6 +182,29 @@ void Flang::addCodegenOptions(const ArgList &Args, CmdArgs.push_back("-fcoarray"); } +void Flang::addLTOOptions(const ArgList &Args, ArgStringList &CmdArgs) const { + const auto &TC = getToolChain(); anchuraj wrote: Updated, Thank yo

[clang] [flang] [flang][Driver] Enables lto-partitions and fat-lto-object. (PR #158125)

2025-09-20 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj edited https://github.com/llvm/llvm-project/pull/158125 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] Enables lto-partitions and fat-lto-object. (PR #158125)

2025-09-18 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj closed https://github.com/llvm/llvm-project/pull/158125 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] Enables lto-partitions and fat-lto-object. (PR #158125)

2025-09-18 Thread Anchu Rajendran S via cfe-commits
@@ -182,6 +182,29 @@ void Flang::addCodegenOptions(const ArgList &Args, CmdArgs.push_back("-fcoarray"); } +void Flang::addLTOOptions(const ArgList &Args, ArgStringList &CmdArgs) const { + const ToolChain &TC = getToolChain(); + const Driver &D = TC.getDriver(); + Diagno

[clang] [flang] [flang][Driver] Enables lto-partitions and fat-lto-object. (PR #158125)

2025-09-17 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/158125 >From 78068dcea27ebdfd84743d69a8815f77b8bfcd3d Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Tue, 2 Sep 2025 12:34:06 -0500 Subject: [PATCH 1/2] [flang][Driver] Enables lto-partitions and fat-lto-object

[clang] [flang] Enables lto-partitions and fat-lto-object. (PR #158125)

2025-09-17 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/158125 >From 128bb9fb7c2f0bedff8fb59812930a9b00d1c323 Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Tue, 2 Sep 2025 12:34:06 -0500 Subject: [PATCH] [flang][Driver] Enables lto-partitions and fat-lto-object. lt

[clang] [flang] [flang][Driver] Enables lto-partitions and fat-lto-object. (PR #158125)

2025-09-17 Thread Anchu Rajendran S via cfe-commits
@@ -1494,8 +1484,35 @@ static bool parseLinkerOptionsArgs(CompilerInvocation &invoc, return false; } - invoc.getCodeGenOpts().DependentLibs = + opts.DependentLibs = args.getAllArgValues(clang::driver::options::OPT_dependent_lib); + + // -flto=full/thin option.

[clang] [flang] [flang][Driver] Enables lto-partitions and fat-lto-object. (PR #158125)

2025-09-17 Thread Anchu Rajendran S via cfe-commits
@@ -1494,8 +1484,35 @@ static bool parseLinkerOptionsArgs(CompilerInvocation &invoc, return false; } - invoc.getCodeGenOpts().DependentLibs = + opts.DependentLibs = args.getAllArgValues(clang::driver::options::OPT_dependent_lib); + + // -flto=full/thin option.

[clang] [flang] [flang][Driver] Enables lto-partitions and fat-lto-object. (PR #158125)

2025-09-17 Thread Anchu Rajendran S via cfe-commits
@@ -995,7 +995,12 @@ void CodeGenAction::runOptimizationPipeline(llvm::raw_pwrite_stream &os) { // Create the pass manager. llvm::ModulePassManager mpm; - if (opts.PrepareForFullLTO) + if (opts.PrepareForFatLTO) { +bool emitSummary = opts.PrepareForThinLTO || opts.P

[clang] [flang] [flang][Driver] Enables lto-partitions and fat-lto-object. (PR #158125)

2025-09-17 Thread Anchu Rajendran S via cfe-commits
@@ -0,0 +1,19 @@ +! UNSUPPORTED: system-windows +! check flto-partitions is passed to lld, fc1 +! RUN: %flang -### -fuse-ld=lld -flto=full -flto-partitions=16 %s 2>&1 | FileCheck %s --check-prefixes=LLD-PART,FC1-PART + +! FC1-PART: "-fc1" +! FC1-PART-SAME: "-flto=full" +! FC1-PAR

[clang] [flang] [flang][Driver] Enables lto-partitions and fat-lto-object. (PR #158125)

2025-09-17 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/158125 >From 78068dcea27ebdfd84743d69a8815f77b8bfcd3d Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Tue, 2 Sep 2025 12:34:06 -0500 Subject: [PATCH 1/2] [flang][Driver] Enables lto-partitions and fat-lto-object

[clang] [flang] [flang][Driver] Enables lto-partitions and fat-lto-object. (PR #158125)

2025-09-17 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/158125 >From 78068dcea27ebdfd84743d69a8815f77b8bfcd3d Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Tue, 2 Sep 2025 12:34:06 -0500 Subject: [PATCH 1/2] [flang][Driver] Enables lto-partitions and fat-lto-object

[clang] [flang] [flang][Driver] Enables lto-partitions and fat-lto-object. (PR #158125)

2025-09-16 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/158125 >From 78068dcea27ebdfd84743d69a8815f77b8bfcd3d Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Tue, 2 Sep 2025 12:34:06 -0500 Subject: [PATCH 1/2] [flang][Driver] Enables lto-partitions and fat-lto-object

[clang] [flang] [flang][Driver] Enables lto-partitions and fat-lto-object. (PR #158125)

2025-09-16 Thread Anchu Rajendran S via cfe-commits
@@ -995,7 +995,9 @@ void CodeGenAction::runOptimizationPipeline(llvm::raw_pwrite_stream &os) { // Create the pass manager. llvm::ModulePassManager mpm; - if (opts.PrepareForFullLTO) + if (opts.PrepareForFatLTO) +mpm = pb.buildFatLTODefaultPipeline(level, opts.Prepar

[clang] [flang] [flang][driver] Support -gdwarf-N option. (PR #158314)

2025-09-15 Thread Anchu Rajendran S via cfe-commits
anchuraj wrote: > functionality Sounds great. Please skip my warning suggestion. https://github.com/llvm/llvm-project/pull/158314 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] Enables lto-partitions and fat-lto-object. (PR #158125)

2025-09-12 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj created https://github.com/llvm/llvm-project/pull/158125 lto-partition helps in performing parallel lto and fat-lto-objects allows bit code to be embedded in object files generated. >From 469e559e7d07dd9db9b67737f8189f4658f1b8ee Mon Sep 17 00:00:00 2001 From: Anchu

[clang] [flang] [flang][Driver] Enables lto-partitions and fat-lto-object. (PR #158125)

2025-09-12 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/158125 >From 78068dcea27ebdfd84743d69a8815f77b8bfcd3d Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Tue, 2 Sep 2025 12:34:06 -0500 Subject: [PATCH] [flang][Driver] Enables lto-partitions and fat-lto-object. lt

[clang] [flang] [flang][driver] Support -gdwarf-N option. (PR #158314)

2025-09-12 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj edited https://github.com/llvm/llvm-project/pull/158314 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][driver] Support -gdwarf-N option. (PR #158314)

2025-09-12 Thread Anchu Rajendran S via cfe-commits
anchuraj wrote: Hi @abidh , Thank you for the change. LGTM except the default visibility change. However, merging this change alone would mean flang would be accepting this option and no indication that its handled. It would be nice if - In Flang.cpp, you can throw a warning that it is not hand

[clang] [flang] Enables lto-partitions and fat-lto-object. (PR #158125)

2025-09-12 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/158125 >From 51bdcb09b4c565ba1bdd12a472cc253b3e2a2a64 Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Tue, 2 Sep 2025 12:34:06 -0500 Subject: [PATCH] Enables lto-partitions and fat-lto-object. lto-partition help

[clang] [flang] Enables lto-partitions and fat-lto-object. (PR #158125)

2025-09-12 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/158125 >From 25da2a1a113d83277571e2fb46727f29f5ebbbcf Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Tue, 2 Sep 2025 12:34:06 -0500 Subject: [PATCH] Enables lto-partitions and fat-lto-object. lto-partition help

[clang] [flang] [Flang][Flang-Driver]Fix to add atomic control options in non-fc1 mode (PR #154638)

2025-08-21 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj closed https://github.com/llvm/llvm-project/pull/154638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][OpenMP] Add -f[no]-openmp-simd (PR #150269)

2025-08-06 Thread Anchu Rajendran S via cfe-commits
@@ -0,0 +1,524 @@ +//===-- SimdOnly.cpp --===// +// +// 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: Ap

[clang] [flang] [flang][OpenMP] Add -f[no]-openmp-simd (PR #150269)

2025-08-06 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj requested changes to this pull request. https://github.com/llvm/llvm-project/pull/150269 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [mlir] [flang][MLIR][OpenMP][llvm]Atomic Control Support (PR #150860)

2025-07-28 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj closed https://github.com/llvm/llvm-project/pull/150860 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [mlir] [flang][MLIR][OpenMP][llvm]Atomic Control Support (PR #150860)

2025-07-27 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj created https://github.com/llvm/llvm-project/pull/150860 Atomic Control Options are used to specify architectural characteristics to help lowering of atomic operations. The options used are: `-f[no-]atomic-remote-memory`, `-f[no-]atomic-fine-grained-memory`, `-f[no

[clang] [flang] [mlir] Revert "[flang][flang-driver][mlir][OpenMP] atomic control support" (PR #150504)

2025-07-24 Thread Anchu Rajendran S via cfe-commits
anchuraj wrote: Thank you for the revert. I was away and couldn't revert it. Will take a look when I am back. https://github.com/llvm/llvm-project/pull/150504 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [flang] [mlir] Revert "[flang][flang-driver][mlir][OpenMP] atomic control support" (PR #150504)

2025-07-24 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj approved this pull request. https://github.com/llvm/llvm-project/pull/150504 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [mlir] [flang][flang-driver][mlir][OpenMP] atomic control support (PR #143441)

2025-07-24 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj closed https://github.com/llvm/llvm-project/pull/143441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [mlir] [flang][flang-driver][mlir][OpenMP] atomic control support (PR #143441)

2025-07-24 Thread Anchu Rajendran S via cfe-commits
anchuraj wrote: > Thank you Anchu, and excuse me for the long delay taking another look at > this. LGTM, only non-blocking nits from me, feel free to merge when you're > ready! Thank you and no worries! .I have addressed your suggestions https://github.com/llvm/llvm-project/pull/143441 __

[clang] [flang] [mlir] [flang][flang-driver][mlir][OpenMP] atomic control support (PR #143441)

2025-07-02 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/143441 >From 4816fb9bc0761d8761798300bb419db0072c9d04 Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Wed, 4 Jun 2025 15:12:49 -0500 Subject: [PATCH 1/5] [flang][flang-driver] atomic control support --- clang/i

[clang] [flang] [mlir] [flang][flang-driver][mlir][OpenMP] atomic control support (PR #143441)

2025-07-02 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/143441 >From 4816fb9bc0761d8761798300bb419db0072c9d04 Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Wed, 4 Jun 2025 15:12:49 -0500 Subject: [PATCH 1/5] [flang][flang-driver] atomic control support --- clang/i

[clang] [flang] [mlir] [flang][flang-driver][mlir][OpenMP] atomic control support (PR #143441)

2025-07-02 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/143441 >From 55e513da2cb2d68dfb91e889bb66b7fdd58090ac Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Wed, 4 Jun 2025 15:12:49 -0500 Subject: [PATCH 1/5] [flang][flang-driver] atomic control support --- clang/i

[clang] [flang] [mlir] [flang][flang-driver][mlir][OpenMP] atomic control support (PR #143441)

2025-07-02 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/143441 >From 55e513da2cb2d68dfb91e889bb66b7fdd58090ac Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Wed, 4 Jun 2025 15:12:49 -0500 Subject: [PATCH 1/5] [flang][flang-driver] atomic control support --- clang/i

[clang] [flang] [mlir] [flang][flang-driver][mlir][OpenMP] atomic control support (PR #143441)

2025-07-02 Thread Anchu Rajendran S via cfe-commits
@@ -53,6 +53,11 @@ class TargetOptions { /// Print verbose assembly bool asmVerbose = false; + + /// Atomic control options for AMD gpu + bool ignoreDenormalMode = false; + bool remoteMemory = false; + bool fineGrainedMemory = false; anchuraj wrote: I

[clang] [flang] [mlir] [flang][flang-driver][mlir][OpenMP] atomic control support (PR #143441)

2025-06-26 Thread Anchu Rajendran S via cfe-commits
anchuraj wrote: pinging for review https://github.com/llvm/llvm-project/pull/143441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [mlir] [flang][flang-driver][mlir][OpenMP] atomic control support (PR #143441)

2025-06-26 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/143441 >From 55e513da2cb2d68dfb91e889bb66b7fdd58090ac Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Wed, 4 Jun 2025 15:12:49 -0500 Subject: [PATCH 1/4] [flang][flang-driver] atomic control support --- clang/i

[clang] [flang] [mlir] [flang][flang-driver][mlir][OpenMP] atomic control support (PR #143441)

2025-06-26 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/143441 >From 55e513da2cb2d68dfb91e889bb66b7fdd58090ac Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Wed, 4 Jun 2025 15:12:49 -0500 Subject: [PATCH 1/4] [flang][flang-driver] atomic control support --- clang/i

[clang] [flang] [mlir] [flang][flang-driver][mlir][OpenMP] atomic control support (PR #143441)

2025-06-25 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/143441 >From 5885864dfd0617a24621b00a1f1bb8fc293b7611 Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Wed, 4 Jun 2025 15:12:49 -0500 Subject: [PATCH 1/4] [flang][flang-driver] atomic control support --- clang/i

[clang] [flang] [mlir] [flang][flang-driver][mlir][OpenMP] atomic control support (PR #143441)

2025-06-23 Thread Anchu Rajendran S via cfe-commits
anchuraj wrote: > Please remove 'amdgpu' from variable and function names. These options may be > useful for other targets as well. Thank you for the review. I have updated. https://github.com/llvm/llvm-project/pull/143441 ___ cfe-commits mailing li

[clang] [flang] [mlir] [flang][flang-driver][mlir][OpenMP] atomic control support (PR #143441)

2025-06-23 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/143441 >From c9b65080c1301c46b05fddc1278eaf2817963cb9 Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Wed, 4 Jun 2025 15:12:49 -0500 Subject: [PATCH 1/4] [flang][flang-driver] atomic control support --- clang/i

[clang] [flang] [mlir] [flang][flang-driver][mlir][OpenMP] atomic control support (PR #143441)

2025-06-13 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj edited https://github.com/llvm/llvm-project/pull/143441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [mlir] [mlir][OpenMP][llvm]Atomic control backend (PR #143769)

2025-06-13 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj edited https://github.com/llvm/llvm-project/pull/143769 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [mlir] Atomic control backend (PR #143769)

2025-06-13 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/143769 >From c9b65080c1301c46b05fddc1278eaf2817963cb9 Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Wed, 4 Jun 2025 15:12:49 -0500 Subject: [PATCH 1/4] [flang][flang-driver] atomic control support --- clang/i

[clang] [flang] [llvm] [mlir] Atomic control backend (PR #143769)

2025-06-11 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj edited https://github.com/llvm/llvm-project/pull/143769 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [mlir] Atomic control backend (PR #143769)

2025-06-11 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/143769 >From c9b65080c1301c46b05fddc1278eaf2817963cb9 Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Wed, 4 Jun 2025 15:12:49 -0500 Subject: [PATCH 1/4] [flang][flang-driver] atomic control support --- clang/i

[clang] [flang] [mlir] [flang][flang-driver] atomic control support (PR #143441)

2025-06-11 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/143441 >From c9b65080c1301c46b05fddc1278eaf2817963cb9 Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Wed, 4 Jun 2025 15:12:49 -0500 Subject: [PATCH 1/3] [flang][flang-driver] atomic control support --- clang/i

[clang] [flang] [mlir] [flang][flang-driver] atomic control support (PR #143441)

2025-06-11 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/143441 >From c9b65080c1301c46b05fddc1278eaf2817963cb9 Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Wed, 4 Jun 2025 15:12:49 -0500 Subject: [PATCH 1/3] [flang][flang-driver] atomic control support --- clang/i

[clang] [flang] [mlir] [flang][flang-driver] atomic control support (PR #143441)

2025-06-11 Thread Anchu Rajendran S via cfe-commits
@@ -88,6 +88,46 @@ void fir::setTuneCPU(mlir::ModuleOp mod, llvm::StringRef cpu) { mod->setAttr(tuneCpuName, mlir::StringAttr::get(ctx, cpu)); } +static constexpr const char *amdgpuIgnoreDenormalModeName = +"fir.amdgpu.ignore.denormal.mode"; +void fir::setAmdgpuIgnoreDe

[clang] [flang] [mlir] [flang][flang-driver] atomic control support (PR #143441)

2025-06-11 Thread Anchu Rajendran S via cfe-commits
@@ -58,10 +58,24 @@ void setTargetCPU(mlir::ModuleOp mod, llvm::StringRef cpu); /// Get the target CPU string from the Module or return a null reference. llvm::StringRef getTargetCPU(mlir::ModuleOp mod); +// Setters and Getters for atomic control options anchu

[clang] [flang] [mlir] [flang][flang-driver] atomic control support (PR #143441)

2025-06-11 Thread Anchu Rajendran S via cfe-commits
@@ -53,6 +53,11 @@ class TargetOptions { /// Print verbose assembly bool asmVerbose = false; + + /// Atomic Control Options for AMD GPU anchuraj wrote: Updated https://github.com/llvm/llvm-project/pull/143441

[clang] [flang] [mlir] [flang][flang-driver] atomic control support (PR #143441)

2025-06-11 Thread Anchu Rajendran S via cfe-commits
@@ -58,10 +58,24 @@ void setTargetCPU(mlir::ModuleOp mod, llvm::StringRef cpu); /// Get the target CPU string from the Module or return a null reference. llvm::StringRef getTargetCPU(mlir::ModuleOp mod); +// Setters and Getters for atomic control options +void setAmdgpuIgnoreD

[clang] [flang] [mlir] [flang][flang-driver] atomic control support (PR #143441)

2025-06-11 Thread Anchu Rajendran S via cfe-commits
@@ -2911,8 +2911,13 @@ static void genAtomicUpdateStatement( if (rightHandClauseList) genOmpAtomicHintAndMemoryOrderClauses(converter, *rightHandClauseList, hint, memoryOrder); + auto module = firOpBuilder.getModule(); -

[clang] [flang] [mlir] [flang][flang-driver] atomic control support (PR #143441)

2025-06-11 Thread Anchu Rajendran S via cfe-commits
@@ -54,6 +54,20 @@ def FlagsAttr : OpenMP_Attr<"Flags", "flags"> { let assemblyFormat = "`<` struct(params) `>`"; } +//===--===// +// AtomicControlAttr +//===-

[clang] [flang] [mlir] [flang][flang-driver] atomic control support (PR #143441)

2025-06-11 Thread Anchu Rajendran S via cfe-commits
anchuraj wrote: > Thanks for this. > > Since you have added both `FlangOption` and `FC1Option` in `Options.td`, > could you add a test that checks that the option is handled by the main > driver as well as `fc1`. One that simply checks that the option gets passed > down to `fc1` from the main

[clang] [flang] [llvm] [mlir] Atomic control backend (PR #143769)

2025-06-11 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj edited https://github.com/llvm/llvm-project/pull/143769 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [mlir] Atomic control backend (PR #143769)

2025-06-11 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/143769 >From c9b65080c1301c46b05fddc1278eaf2817963cb9 Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Wed, 4 Jun 2025 15:12:49 -0500 Subject: [PATCH 1/4] [flang][flang-driver] atomic control support --- clang/i

[clang] [flang] [mlir] [flang][flang-driver] atomic control support (PR #143441)

2025-06-11 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/143441 >From c9b65080c1301c46b05fddc1278eaf2817963cb9 Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Wed, 4 Jun 2025 15:12:49 -0500 Subject: [PATCH 1/3] [flang][flang-driver] atomic control support --- clang/i

[clang] [flang] [llvm] [mlir] Atomic control backend (PR #143769)

2025-06-11 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/143769 >From c9b65080c1301c46b05fddc1278eaf2817963cb9 Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Wed, 4 Jun 2025 15:12:49 -0500 Subject: [PATCH 1/4] [flang][flang-driver] atomic control support --- clang/i

[clang] [flang] [mlir] [flang][flang-driver] atomic control support (PR #143441)

2025-06-11 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/143441 >From c9b65080c1301c46b05fddc1278eaf2817963cb9 Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Wed, 4 Jun 2025 15:12:49 -0500 Subject: [PATCH 1/3] [flang][flang-driver] atomic control support --- clang/i

[clang] [flang] [mlir] [flang][flang-driver] atomic control support (PR #143441)

2025-06-11 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj edited https://github.com/llvm/llvm-project/pull/143441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [mlir] Atomic control backend (PR #143769)

2025-06-11 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj created https://github.com/llvm/llvm-project/pull/143769 None >From 51c6a6a9b1f58f37df3eb1b6988b62f489c8f4b8 Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Wed, 4 Jun 2025 15:12:49 -0500 Subject: [PATCH 1/2] [flang][flang-driver] atomic control support --- c

[clang] [flang] [mlir] [flang][flang-driver] atomic control support (PR #143441)

2025-06-11 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/143441 >From 51c6a6a9b1f58f37df3eb1b6988b62f489c8f4b8 Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Wed, 4 Jun 2025 15:12:49 -0500 Subject: [PATCH 1/2] [flang][flang-driver] atomic control support --- clang/i

[clang] [flang] [mlir] [flang][flang-driver] atomic control support (PR #143441)

2025-06-11 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj edited https://github.com/llvm/llvm-project/pull/143441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [mlir] [flang][flang-driver] atomic control support (PR #143441)

2025-06-09 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj created https://github.com/llvm/llvm-project/pull/143441 Atomic Control Options are used to specify architectural characteristics to help lowering of atomic operations. The options used are: `-f[no-]atomic-remote-memory`, `-f[no-]atomic-fine-grained-memory`, `-f[no

[clang] [flang] [flang][flang-driver] Support flag -finstrument-functions (PR #137996)

2025-06-09 Thread Anchu Rajendran S via cfe-commits
anchuraj wrote: > Hi @anchuraj! Nice patch! Are you interesting in extending the front-end > handling to support: > > ``` > -finstrument-functions-exclude-function-list=sym,sym,... > ``` > > ``` > -finstrument-functions-exclude-file-list=file,file,... > ``` > > In my experience, if found that

[clang] [flang] [flang][flang-driver] Support flag -finstrument-functions (PR #137996)

2025-05-02 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj closed https://github.com/llvm/llvm-project/pull/137996 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][flang-driver] Support flag -finstrument-functions (PR #137996)

2025-05-01 Thread Anchu Rajendran S via cfe-commits
@@ -81,6 +81,8 @@ class CodeGenOptions : public CodeGenOptionsBase { /// Options to add to the linker for the object file std::vector DependentLibs; + bool InstrumentFunctions{false}; anchuraj wrote: Thank you for the review @tblah . Updated. https://gi

[clang] [flang] [flang][flang-driver] Support flag -finstrument-functions (PR #137996)

2025-05-01 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/137996 >From bb486c5e7cbe7b1c4a87469e06ca51bf49ddd081 Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Tue, 29 Apr 2025 14:41:55 -0500 Subject: [PATCH 1/4] [flang] Support flag -finstrument-functions --- clang/

[clang] [flang] [flang][flang-driver] Support flag -finstrument-functions (PR #137996)

2025-04-30 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/137996 >From bb486c5e7cbe7b1c4a87469e06ca51bf49ddd081 Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Tue, 29 Apr 2025 14:41:55 -0500 Subject: [PATCH 1/3] [flang] Support flag -finstrument-functions --- clang/

[clang] [flang] [flang][flang-driver] Support flag -finstrument-functions (PR #137996)

2025-04-30 Thread Anchu Rajendran S via cfe-commits
@@ -81,6 +81,8 @@ class CodeGenOptions : public CodeGenOptionsBase { /// Options to add to the linker for the object file std::vector DependentLibs; + bool InstrumentFunctions{false}; anchuraj wrote: Updated. Thank you! https://github.com/llvm/llvm-proj

[clang] [flang] [flang][flang-driver] Support flag -finstrument-functions (PR #137996)

2025-04-30 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/137996 >From bb486c5e7cbe7b1c4a87469e06ca51bf49ddd081 Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Tue, 29 Apr 2025 14:41:55 -0500 Subject: [PATCH 1/3] [flang] Support flag -finstrument-functions --- clang/

[clang] [flang] [flang][flang-driver] Support flag -finstrument-functions (PR #137996)

2025-04-30 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/137996 >From bb486c5e7cbe7b1c4a87469e06ca51bf49ddd081 Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Tue, 29 Apr 2025 14:41:55 -0500 Subject: [PATCH 1/2] [flang] Support flag -finstrument-functions --- clang/

[clang] [flang] [flang][flang-driver] Support flag -finstrument-functions (PR #137996)

2025-04-30 Thread Anchu Rajendran S via cfe-commits
@@ -310,6 +310,10 @@ static void parseCodeGenArgs(Fortran::frontend::CodeGenOptions &opts, args.filtered(clang::driver::options::OPT_fembed_offload_object_EQ)) opts.OffloadObjects.push_back(a->getValue()); + if (args.hasFlag(clang::driver::options::OPT_finstrument

[clang] [flang] [flang][flang-driver] Support flag -finstrument-functions (PR #137996)

2025-04-30 Thread Anchu Rajendran S via cfe-commits
@@ -124,6 +128,8 @@ struct MLIRToLLVMPassPipelineConfig : public FlangEPCallBacks { bool UnsafeFPMath = false; ///< Set unsafe-fp-math attribute for functions. bool NSWOnLoopVarInc = true; ///< Add nsw flag to loop variable increments. bool EnableOpenMP = false; ///< Ena

[clang] [flang] [flang][flang-driver] Support flag -finstrument-functions (PR #137996)

2025-04-30 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj edited https://github.com/llvm/llvm-project/pull/137996 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Support flag -finstrument-functions (PR #137996)

2025-04-30 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj created https://github.com/llvm/llvm-project/pull/137996 `f-instrument-functions` helps in profiling functions. This PR adds support for the option by defining values for function attributes `instrument_function_entry` and `instrument_function_exit`. LLVM Backend a