[clang] [flang] [Flang] RFC: Add support for -w option 1/n (PR #90420)

2024-05-08 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan closed https://github.com/llvm/llvm-project/pull/90420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [Flang] RFC: Add support for -w option 1/n (PR #90420)

2024-05-07 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan updated https://github.com/llvm/llvm-project/pull/90420 >From 78e91d2d84638ded51267c5e0720cc1d1d4d773b Mon Sep 17 00:00:00 2001 From: Kiran Chandramohan Date: Fri, 26 Apr 2024 09:26:11 + Subject: [PATCH 1/2] [Flang][Driver] Add support for -w option 1/n

[clang] [flang] [Flang] RFC: Add support for -w option 1/n (PR #90420)

2024-05-07 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: Done. https://github.com/llvm/llvm-project/pull/90420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [Flang] RFC: Add support for -w option 1/n (PR #90420)

2024-05-07 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan updated https://github.com/llvm/llvm-project/pull/90420 >From 78e91d2d84638ded51267c5e0720cc1d1d4d773b Mon Sep 17 00:00:00 2001 From: Kiran Chandramohan Date: Fri, 26 Apr 2024 09:26:11 + Subject: [PATCH 1/2] [Flang][Driver] Add support for -w option 1/n

[clang] [flang] [Flang] RFC: Add support for -w option 1/n (PR #90420)

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

[clang] [flang] [Flang] RFC: Add support for -w option (PR #90420)

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

[clang] [flang] [Flang] RFC: Add support for -w option (PR #90420)

2024-05-06 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan ready_for_review https://github.com/llvm/llvm-project/pull/90420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [Flang] RFC: Add support for -w option (PR #90420)

2024-05-06 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan updated https://github.com/llvm/llvm-project/pull/90420 >From a250de8647af85e51e3eb7bf87c6a881a6de5ca0 Mon Sep 17 00:00:00 2001 From: Kiran Chandramohan Date: Fri, 26 Apr 2024 09:26:11 + Subject: [PATCH] [Flang][Driver] Add support for -w option 1/n

[clang] [flang] [Flang] RFC: Add support for -w option (PR #90420)

2024-05-06 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan updated https://github.com/llvm/llvm-project/pull/90420 >From a250de8647af85e51e3eb7bf87c6a881a6de5ca0 Mon Sep 17 00:00:00 2001 From: Kiran Chandramohan Date: Fri, 26 Apr 2024 09:26:11 + Subject: [PATCH] [Flang][Driver] Add support for -w option 1/n

[clang] [flang] [Flang] RFC: Add support for -w option (PR #90420)

2024-04-30 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: Thanks @jeffhammond. I will wait for @klausler to submit https://github.com/llvm/llvm-project/pull/90518 which will make it easier for the driver and will provide more fine-grained control of warnings. https://github.com/llvm/llvm-project/pull/90420

[clang] [flang] [Flang] RFC: Add support for -w option (PR #90420)

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

[clang] [flang] [Flang] RFC: Add support for -w option (PR #90420)

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

[clang] [flang] [Flang] Add support for -w option (PR #90420)

2024-04-28 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan updated https://github.com/llvm/llvm-project/pull/90420 >From 6a22c2de281bc04c9f71b7fcc8289e4217b70e08 Mon Sep 17 00:00:00 2001 From: Kiran Chandramohan Date: Fri, 26 Apr 2024 09:26:11 + Subject: [PATCH] [Flang][Driver] Add support for -w option A

[clang] [flang] [Flang] Add support for -w option (PR #90420)

2024-04-28 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan edited https://github.com/llvm/llvm-project/pull/90420 ___ 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 for -w option (PR #90420)

2024-04-28 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan created https://github.com/llvm/llvm-project/pull/90420 A quick and dirty implementation of the -w option. Filters the warning messages generated by the Frontend during emission. TODO: Add more tests TODO: Ignore MLIR, LLVM IR and Driver warnings TODO:

[clang] [flang] [flang][draft] Improve debug info generation. (PR #84202)

2024-03-06 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: Thanks for this patch to improve debug support in Flang. If you are planning to work long-time on enabling full debug support then it would be good to write a design document (in flang/docs), get it agreed upon by everyone and then proceed. I attempted some time ago

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-03 Thread Kiran Chandramohan via cfe-commits
@@ -619,44 +595,22 @@ bool clang::isOpenMPWorksharingDirective(OpenMPDirectiveKind DKind) { } bool clang::isOpenMPTaskLoopDirective(OpenMPDirectiveKind DKind) { - return DKind == OMPD_taskloop || DKind == OMPD_taskloop_simd || - DKind == OMPD_master_taskloop ||

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-03 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. > Add members "leafs" and "association" to .td describing OpenMP/ACC > directives: "leafs" are the leaf constructs for composite/combined > constructs, and "association" is the source language construct to which the > directive

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

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

[clang] [flang] [flang] Enable polymorphic lowering by default (PR #83285)

2024-02-28 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/83285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [RFC][flang][runtime] Add FortranFloat128Math wrapper library. (PR #81971)

2024-02-20 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. Thanks Slava. https://github.com/llvm/llvm-project/pull/81971 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [clang][flang][driver] Correct program names in option group descriptions (PR #81726)

2024-02-14 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. LGTM. Thanks @DavidSpickett for the fix. https://github.com/llvm/llvm-project/pull/81726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [flang] [clang][flang][driver] Correct program names in option group descriptions (PR #81726)

2024-02-14 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: Unrelated, but just wanted to bring this up since you are working in this area and distinguishing between Flang and Clang. Flang does not generate the Diagnostics Reference and hence ends up with the warning (see below) in the docs CI

[flang] [clang] [flang]Add support for -moutline-atomics and -mno-outline-atomics (PR #78755)

2024-02-02 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. LG. Please address or reply to comments before submitting. https://github.com/llvm/llvm-project/pull/78755 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [flang] [flang]Add support for -moutline-atomics and -mno-outline-atomics (PR #78755)

2024-02-02 Thread Kiran Chandramohan via cfe-commits
@@ -0,0 +1,18 @@ +! RUN: %flang -S -emit-llvm --target=aarch64-none-none -moutline-atomics -o - %s | FileCheck %s --check-prefixes=CHECKON,CHECKALL kiranchandramohan wrote: I think it is better if this is in the integration test directory.

[clang] [flang] [flang]Add support for -moutline-atomics and -mno-outline-atomics (PR #78755)

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

[clang] [flang] [flang]Add support for -moutline-atomics and -mno-outline-atomics (PR #78755)

2024-01-31 Thread Kiran Chandramohan via cfe-commits
@@ -215,11 +215,15 @@ void addMachineOutlinerArgs(const Driver , const llvm::opt::ArgList , void addOpenMPDeviceRTL(const Driver , const llvm::opt::ArgList , llvm::opt::ArgStringList , StringRef BitcodeSuffix, const llvm::Triple

[flang] [clang] [flang]Add support for -moutline-atomics and -mno-outline-atomics (PR #78755)

2024-01-31 Thread Kiran Chandramohan via cfe-commits
@@ -402,6 +402,21 @@ static void parseTargetArgs(TargetOptions , llvm::opt::ArgList ) { for (const llvm::opt::Arg *currentArg : args.filtered(clang::driver::options::OPT_target_feature)) opts.featuresAsWritten.emplace_back(currentArg->getValue()); + +

[clang] [flang] [flang]Add support for -moutline-atomics and -mno-outline-atomics (PR #78755)

2024-01-31 Thread Kiran Chandramohan via cfe-commits
@@ -215,11 +215,15 @@ void addMachineOutlinerArgs(const Driver , const llvm::opt::ArgList , void addOpenMPDeviceRTL(const Driver , const llvm::opt::ArgList , llvm::opt::ArgStringList , StringRef BitcodeSuffix, const llvm::Triple

[clang] [flang] [flang]Add support for -moutline-atomics and -mno-outline-atomics (PR #78755)

2024-01-31 Thread Kiran Chandramohan via cfe-commits
@@ -2790,3 +2790,27 @@ void tools::addHIPRuntimeLibArgs(const ToolChain , Compilation , } } } + +void tools::addOutlineAtomicsArgs(const Driver , const ToolChain , const llvm::opt::ArgList , llvm::opt::ArgStringList & CmdArgs, const llvm::Triple )

[clang] [flang] [flang]Add support for -moutline-atomics and -mno-outline-atomics (PR #78755)

2024-01-31 Thread Kiran Chandramohan via cfe-commits
@@ -672,7 +674,7 @@ void Flang::ConstructJob(Compilation , const JobAction , CmdArgs.push_back(Args.MakeArgString(TripleStr)); if (isa(JA)) { - CmdArgs.push_back("-E"); +CmdArgs.push_back("-E"); kiranchandramohan wrote: Nit: accidental change.

[clang] [flang] [flang]Add support for -moutline-atomics and -mno-outline-atomics (PR #78755)

2024-01-19 Thread Kiran Chandramohan via cfe-commits
@@ -354,6 +354,27 @@ void Flang::addTargetOptions(const ArgList , CmdArgs.push_back(Args.MakeArgString(CPU)); } + if (Arg *A = Args.getLastArg(options::OPT_moutline_atomics, + options::OPT_mno_outline_atomics)) { +// Option

[clang] [flang] [flang]Add support for -moutline-atomics and -mno-outline-atomics (PR #78755)

2024-01-19 Thread Kiran Chandramohan via cfe-commits
@@ -0,0 +1,11 @@ +! Test that flang-new forwards the -moutline-atomics and -mno-outline-atomics. +! RUN: %flang -moutline-atomics --target=aarch64-none-none -### %s -o %t 2>&1 | FileCheck %s +! CHECK: "-target-feature" "+outline-atomics" + +! RUN: %flang -mno-outline-atomics

[llvm] [flang] [compiler-rt] [clang] [clang-tools-extra] [Flang][OpenMP] Restructure recursive lowering in `createBodyOfOp` (PR #77761)

2024-01-19 Thread Kiran Chandramohan via cfe-commits
@@ -2223,37 +,100 @@ static void createBodyOfOp( mlir::omp::YieldOp>( firOpBuilder, eval.getNestedEvaluations()); - // Insert the terminator. - Fortran::lower::genOpenMPTerminator(firOpBuilder, op.getOperation(), loc);

[compiler-rt] [clang] [flang] [clang-tools-extra] [llvm] [Flang][OpenMP] Restructure recursive lowering in `createBodyOfOp` (PR #77761)

2024-01-19 Thread Kiran Chandramohan via cfe-commits
@@ -2223,37 +2247,64 @@ static void createBodyOfOp( mlir::omp::YieldOp>( firOpBuilder, eval.getNestedEvaluations()); - // Insert the terminator. - Fortran::lower::genOpenMPTerminator(firOpBuilder, op.getOperation(), loc);

[llvm] [clang] [compiler-rt] [flang] [clang-tools-extra] [Flang][OpenMP] Restructure recursive lowering in `createBodyOfOp` (PR #77761)

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

[clang-tools-extra] [llvm] [compiler-rt] [clang] [flang] [Flang][OpenMP] Restructure recursive lowering in `createBodyOfOp` (PR #77761)

2024-01-19 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/77761 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libc] [clang-tools-extra] [compiler-rt] [flang] [llvm] [clang] [flang] use setsid to assign the child to prevent zombie as it will be clean up by init process (PR #77944)

2024-01-19 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. LG. https://github.com/llvm/llvm-project/pull/77944 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [flang] [llvm] [clang-tools-extra] [Flang][OpenMP] Restructure recursive lowering in `createBodyOfOp` (PR #77761)

2024-01-18 Thread Kiran Chandramohan via cfe-commits
@@ -2223,37 +2247,64 @@ static void createBodyOfOp( mlir::omp::YieldOp>( firOpBuilder, eval.getNestedEvaluations()); - // Insert the terminator. - Fortran::lower::genOpenMPTerminator(firOpBuilder, op.getOperation(), loc);

[flang] [compiler-rt] [clang] [llvm] [clang-tools-extra] [Flang][OpenMP] Restructure recursive lowering in `createBodyOfOp` (PR #77761)

2024-01-18 Thread Kiran Chandramohan via cfe-commits
@@ -2186,11 +2178,43 @@ static void createBodyOfOp( const llvm::SmallVector = {}, bool outerCombined = false, DataSharingProcessor *dsp = nullptr) { fir::FirOpBuilder = converter.getFirOpBuilder(); + + auto insertMarker = [](fir::FirOpBuilder ) { +mlir::Value

[libc] [flang] [compiler-rt] [clang-tools-extra] [llvm] [clang] [flang] use setsid to assign the child to prevent zombie as it will be clean up by init process (PR #77944)

2024-01-18 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: Could you add a test? https://github.com/llvm/llvm-project/pull/77944 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [compiler-rt] [clang] [llvm] [clang-tools-extra] [Flang][OpenMP] Push genEval closer to leaf lowering functions (PR #77760)

2024-01-18 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. LG. https://github.com/llvm/llvm-project/pull/77760 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [llvm] [clang] [libcxx] [mlir] [Flang][OpenMP] : Add a temporary lowering for workshare directive (PR #78268)

2024-01-16 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan updated https://github.com/llvm/llvm-project/pull/78268 >From 71c3449d872247e3af05de545e907407ac7ac9f9 Mon Sep 17 00:00:00 2001 From: Kiran Chandramohan Date: Tue, 16 Jan 2024 12:45:23 + Subject: [PATCH] [Flang][OpenMP] : Add a temporary lowering for

[compiler-rt] [libc] [clang-tools-extra] [libcxx] [libcxxabi] [llvm] [lldb] [clang] [lld] [flang] [Flang][OpenMP] Handle SECTION construct from within SECTIONS (PR #77759)

2024-01-15 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. LG. https://github.com/llvm/llvm-project/pull/77759 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [libc] [clang-tools-extra] [libcxx] [libcxxabi] [llvm] [lldb] [clang] [lld] [flang] [Flang][OpenMP] Handle SECTION construct from within SECTIONS (PR #77759)

2024-01-15 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: > Introduce createSectionOp `genSectionOp`? https://github.com/llvm/llvm-project/pull/77759 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [clang-tools-extra] [llvm] [Flang][OpenMP] Avoid default none errors for seq loop indices in par… (PR #76258)

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

[clang] [flang] [flang][driver] Allow explicit specification of -lFortran_main (PR #78152)

2024-01-15 Thread Kiran Chandramohan via cfe-commits
@@ -1200,6 +1200,14 @@ static void addFortranMain(const ToolChain , const ArgList , // TODO: Find an equivalent of `--whole-archive` for Darwin and AIX. if (!isWholeArchivePresent(Args) && !TC.getTriple().isMacOSX() && !TC.getTriple().isOSAIX()) { +// Adding

[compiler-rt] [libcxxabi] [libcxx] [llvm] [libc] [clang-tools-extra] [lldb] [flang] [lld] [clang] [Flang][OpenMP] Push genEval calls to individual operations, NFC (PR #77758)

2024-01-15 Thread Kiran Chandramohan via cfe-commits
@@ -110,6 +110,34 @@ static void gatherFuncAndVarSyms( } } +static Fortran::lower::pft::Evaluation * +getCollapsedEval(Fortran::lower::pft::Evaluation , int collapseValue) { + // Return the Evaluation of the innermost collapsed loop, or the current + // evaluation, if

[clang-tools-extra] [flang] [libcxx] [lld] [libcxxabi] [llvm] [lldb] [libc] [clang] [compiler-rt] [Flang][OpenMP] Push genEval calls to individual operations, NFC (PR #77758)

2024-01-15 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. LG. Please add a pointer to the discussion where it was agreed to pass a reference to the localSymbolTable. https://github.com/llvm/llvm-project/pull/77758 ___ cfe-commits mailing list

[clang-tools-extra] [libcxx] [compiler-rt] [libc] [lldb] [libcxxabi] [flang] [lld] [clang] [llvm] [Flang][OpenMP] Push genEval calls to individual operations, NFC (PR #77758)

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

[clang-tools-extra] [clang] [llvm] [flang] [Flang][OpenMP] Avoid default none errors for seq loop indices in par… (PR #76258)

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

[clang-tools-extra] [clang] [llvm] [flang] [Flang][OpenMP] Avoid default none errors for seq loop indices in par… (PR #76258)

2024-01-12 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan updated https://github.com/llvm/llvm-project/pull/76258 >From 03e611d413cffa6ff7432a8a88db5d6901449f3c Mon Sep 17 00:00:00 2001 From: Kiran Chandramohan Date: Fri, 22 Dec 2023 18:35:00 + Subject: [PATCH] [Flang][OpenMP] Avoid default none errors for seq

[clang] [flang] Fix fveclib on Darwin (PR #77605)

2024-01-10 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. LG. Please add a test if possible. Assuming the issue was that the Argument was not `rendered` if it is `veclib`. https://github.com/llvm/llvm-project/pull/77605 ___ cfe-commits mailing

[llvm] [clang-tools-extra] [clang] [flang] [flang] Pass to add frame pointer attribute (PR #74598)

2023-12-22 Thread Kiran Chandramohan via cfe-commits
@@ -245,6 +245,24 @@ static void parseCodeGenArgs(Fortran::frontend::CodeGenOptions , opts.AliasAnalysis = opts.OptimizationLevel > 0; + if (const llvm::opt::Arg *a = + args.getLastArg(clang::driver::options::OPT_mframe_pointer_EQ)) { +llvm::StringRef s =

[flang] [clang] [Flang, Clang] Enable and test 'rdynamic' flag (PR #75598)

2023-12-21 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan closed https://github.com/llvm/llvm-project/pull/75598 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [llvm] [clang] [clang-tools-extra] [flang] Pass to add frame pointer attribute (PR #74598)

2023-12-21 Thread Kiran Chandramohan via cfe-commits
@@ -349,4 +349,24 @@ def VScaleAttr : Pass<"vscale-attr", "mlir::func::FuncOp"> { let constructor = "::fir::createVScaleAttrPass()"; } +def FunctionAttr : Pass<"function-attr", "mlir::func::FuncOp"> { + let summary = "This is a generic pass that adds function attributes

[clang-tools-extra] [flang] [llvm] [clang] [flang] Pass to add frame pointer attribute (PR #74598)

2023-12-21 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. LG. Please wait for @banach-space https://github.com/llvm/llvm-project/pull/74598 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[flang] [llvm] [clang] [clang-tools-extra] [flang] Pass to add frame pointer attribute (PR #74598)

2023-12-21 Thread Kiran Chandramohan via cfe-commits
@@ -349,4 +349,24 @@ def VScaleAttr : Pass<"vscale-attr", "mlir::func::FuncOp"> { let constructor = "::fir::createVScaleAttrPass()"; } +def FunctionAttr : Pass<"function-attr", "mlir::func::FuncOp"> { + let summary = "This is a generic pass that adds function attributes

[clang-tools-extra] [llvm] [clang] [flang] [flang] Pass to add frame pointer attribute (PR #74598)

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

[clang] [flang] [flang][driver] Remove Fortain_main static library from linking stages (PR #75816)

2023-12-20 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: Looks reasonable to me. I guess the environment settings that are there in the EnvironmentDefaults apply only when the main program is compiled with some flags. It would be good to check the options in EnvironmentDefaults and see that they are all applicable only

[clang-tools-extra] [flang] [clang] [llvm] [flang] Pass to add frame pointer attribute (PR #74598)

2023-12-19 Thread Kiran Chandramohan via cfe-commits
@@ -349,4 +349,23 @@ def VScaleAttr : Pass<"vscale-attr", "mlir::func::FuncOp"> { let constructor = "::fir::createVScaleAttrPass()"; } +def FunctionAttr : Pass<"function-attr", "mlir::func::FuncOp"> { + let summary = "This is a generic pass that adds function attributes

[clang] [llvm] [clang-tools-extra] [flang] [flang] Pass to add frame pointer attribute (PR #74598)

2023-12-19 Thread Kiran Chandramohan via cfe-commits
@@ -0,0 +1,62 @@ +//===- FunctionAttr.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:

[llvm] [clang] [flang] [clang-tools-extra] [flang] Pass to add frame pointer attribute (PR #74598)

2023-12-19 Thread Kiran Chandramohan via cfe-commits
@@ -245,6 +245,24 @@ static void parseCodeGenArgs(Fortran::frontend::CodeGenOptions , opts.AliasAnalysis = opts.OptimizationLevel > 0; + if (const llvm::opt::Arg *a = + args.getLastArg(clang::driver::options::OPT_mframe_pointer_EQ)) { +llvm::StringRef s =

[llvm] [clang] [flang] [clang-tools-extra] [flang] Pass to add frame pointer attribute (PR #74598)

2023-12-19 Thread Kiran Chandramohan via cfe-commits
@@ -38,6 +38,7 @@ CODEGENOPT(Underscoring, 1, 1) ENUM_CODEGENOPT(RelocationModel, llvm::Reloc::Model, 3, llvm::Reloc::PIC_) ///< Name of the relocation model to use. ENUM_CODEGENOPT(DebugInfo, llvm::codegenoptions::DebugInfoKind, 4, llvm::codegenoptions::NoDebugInfo) ///<

[flang] [llvm] [clang-tools-extra] [clang] [flang] Pass to add frame pointer attribute (PR #74598)

2023-12-18 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: > > llc has a --frame-pointer option, so there is likely a way to pass this > > option to the llvm codegen as a global option instead of setting it on all > > function at the MLIR level if the only goal is to propagate it to llvm > > backend. > > I just discussed a

[clang] 08cb640 - [NFC] Remove an unused decl to avoid warning

2023-12-09 Thread Kiran Chandramohan via cfe-commits
Author: Kiran Chandramohan Date: 2023-12-09T16:27:42Z New Revision: 08cb64034f17d50a660ec78ce8ea81a025b0ba71 URL: https://github.com/llvm/llvm-project/commit/08cb64034f17d50a660ec78ce8ea81a025b0ba71 DIFF: https://github.com/llvm/llvm-project/commit/08cb64034f17d50a660ec78ce8ea81a025b0ba71.diff

[flang] [llvm] [clang] [clang-tools-extra] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-08 Thread Kiran Chandramohan via cfe-commits
@@ -10,10 +10,50 @@ // extensions that will eventually be implemented in Fortran. #include "flang/Runtime/extensions.h" +#include "flang/Runtime/character.h" #include "flang/Runtime/command.h" #include "flang/Runtime/descriptor.h" #include "flang/Runtime/io-api.h"

[clang] [flang] [flang][driver] Rename `flang-new` as `flang` (PR #74377)

2023-12-06 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: I am assuming you have got a go-ahead from the code owner and others involved in the discourse discussion. It is probably good to post a link to this patch in the relevant discourse post for information and confirmation. https://github.com/llvm/llvm-project/pull/74377

[clang] [Clang][AArch64] Add fix vector types to header into SVE (PR #73258)

2023-12-04 Thread Kiran Chandramohan via cfe-commits
@@ -2229,6 +2231,12 @@ void NeonEmitter::runHeader(raw_ostream ) { static void emitNeonTypeDefs(const std::string& types, raw_ostream ) { std::string TypedefTypes(types); std::vector TDTypeVec = TypeSpec::fromTypeSpecs(TypedefTypes); + // arm_sve.h followed by arm_neon.h

[clang] [Clang][AArch64] Add fix vector types to header into SVE (PR #73258)

2023-12-04 Thread Kiran Chandramohan via cfe-commits
@@ -2546,6 +2555,53 @@ void NeonEmitter::runFP16(raw_ostream ) { OS << "#endif /* __ARM_FP16_H */\n"; } +void NeonEmitter::runVectorType(raw_ostream ) { + OS << "/*=== arm_vector_types - ARM vector type " +"--===\n" +" *\n" +" *\n" +

[clang] [Clang][AArch64] Add fix vector types to header into SVE (PR #73258)

2023-12-04 Thread Kiran Chandramohan via cfe-commits
@@ -2229,6 +2231,12 @@ void NeonEmitter::runHeader(raw_ostream ) { static void emitNeonTypeDefs(const std::string& types, raw_ostream ) { std::string TypedefTypes(types); std::vector TDTypeVec = TypeSpec::fromTypeSpecs(TypedefTypes); + // arm_sve.h followed by arm_neon.h

[clang] [Clang][AArch64] Add fix vector types to header into SVE (PR #73258)

2023-12-04 Thread Kiran Chandramohan via cfe-commits
@@ -0,0 +1,13 @@ +//===--- arm_vector_types.td - ARM Fixed vector types compiler interface ---===// +// +// 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:

[clang] [Clang][AArch64] Add fix vector types to header into SVE (PR #73258)

2023-12-04 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: Just a drive-through comment. The CI is failing for the following two tests. Clang :: CodeGen/aapcs-align.cpp Clang :: CodeGen/aapcs64-align.cpp https://github.com/llvm/llvm-project/pull/73258 ___ cfe-commits mailing list

[flang] [clang] [flang] (Re-)Enable alias tags pass by default (PR #74250)

2023-12-04 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. LGTM. Thanks. https://github.com/llvm/llvm-project/pull/74250 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [libcxx] [lld] [libcxxabi] [libc] [flang] [lldb] [llvm] [clang] [flang] Pass Argv0 to getIntriniscDir and getOpenMPHeadersDir (PR #73254)

2023-11-30 Thread Kiran Chandramohan via cfe-commits
@@ -101,6 +101,8 @@ class CompilerInvocation : public CompilerInvocationBase { bool warnAsErr = false; + const char *argv0; kiranchandramohan wrote: Nit: This is probably obvious but will be good to add executable name as a comment above.

[lldb] [clang-tools-extra] [llvm] [libcxxabi] [libc] [flang] [lld] [clang] [libcxx] [flang] Pass Argv0 to getIntriniscDir and getOpenMPHeadersDir (PR #73254)

2023-11-30 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan edited https://github.com/llvm/llvm-project/pull/73254 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [libcxx] [clang] [libc] [libcxxabi] [lldb] [clang-tools-extra] [lld] [llvm] [flang] Pass Argv0 to getIntriniscDir and getOpenMPHeadersDir (PR #73254)

2023-11-30 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. LG. https://github.com/llvm/llvm-project/pull/73254 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] Revert "[flang] Enable alias tags pass by default (#73111)" (PR #73821)

2023-11-29 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. Thanks @tblah for the quick response. LG. https://github.com/llvm/llvm-project/pull/73821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [flang] [flang] Enable alias tags pass by default (PR #73111)

2023-11-27 Thread Kiran Chandramohan via cfe-commits
@@ -142,6 +142,26 @@ void Flang::addCodegenOptions(const ArgList , if (shouldLoopVersion(Args)) CmdArgs.push_back("-fversion-loops-for-stride"); + Arg *aliasAnalysis = Args.getLastArg(options::OPT_falias_analysis, +

[clang] [flang] [flang] Enable alias tags pass by default (PR #73111)

2023-11-27 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/73111 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [flang] Enable alias tags pass by default (PR #73111)

2023-11-27 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan edited https://github.com/llvm/llvm-project/pull/73111 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [flang] Enable alias tags pass by default (PR #73111)

2023-11-27 Thread Kiran Chandramohan via cfe-commits
@@ -142,6 +142,26 @@ void Flang::addCodegenOptions(const ArgList , if (shouldLoopVersion(Args)) CmdArgs.push_back("-fversion-loops-for-stride"); + Arg *aliasAnalysis = Args.getLastArg(options::OPT_falias_analysis, +

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-24 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. LG. Thanks for the patch and the changes. https://github.com/llvm/llvm-project/pull/73124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[flang] [clang] [Flang][Clang] Add support for frame pointers in Flang Driver (PR #72146)

2023-11-24 Thread Kiran Chandramohan via cfe-commits
@@ -49,6 +49,26 @@ class CodeGenOptionsBase { class CodeGenOptions : public CodeGenOptionsBase { public: + /// The type of frame pointer used + enum class FramePointerKind { +None,// Omit all frame pointers. +NonLeaf, // Keep non-leaf frame pointers. +All,

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-23 Thread Kiran Chandramohan via cfe-commits
@@ -122,6 +122,7 @@ # the build directory holding that tool. tools = [ ToolSubst("%flang", command=FindTool("flang-new"), unresolved="fatal"), +ToolSubst("%clang", command=FindTool("clang"), unresolved="fatal"), kiranchandramohan wrote: Remove this if

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-23 Thread Kiran Chandramohan via cfe-commits
@@ -0,0 +1,15 @@ +! UNSUPPORTED: system-windows + +! RUN: %clang -o %t.c-object -c %S/Inputs/main_dupes.c kiranchandramohan wrote: You can use %cc for the system-compiler and REQUIRE it to be present for this test. Reference:

[clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-22 Thread Kiran Chandramohan via cfe-commits
@@ -1029,7 +1042,7 @@ void tools::addFortranRuntimeLibraryPath(const ToolChain , ArgStringList ) { // Default to the /../lib directory. This works fine on the // platforms that we have tested so far. We will probably have to

[llvm] [clang-tools-extra] [flang] [clang] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-22 Thread Kiran Chandramohan via cfe-commits
@@ -10,9 +10,52 @@ // extensions that will eventually be implemented in Fortran. #include "flang/Runtime/extensions.h" +#include "terminator.h" #include "flang/Runtime/command.h" #include "flang/Runtime/descriptor.h" #include "flang/Runtime/io-api.h" +#include

[clang-tools-extra] [flang] [llvm] [clang] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-22 Thread Kiran Chandramohan via cfe-commits
@@ -37,5 +80,17 @@ void FORTRAN_PROCEDURE_NAME(getarg)( (void)RTNAME(GetCommandArgument)( n, , nullptr, nullptr, __FILE__, __LINE__); } + +void FORTRAN_PROCEDURE_NAME(getlog)(std::int8_t *arg, std::int64_t length) { + std::array str = {}; + + int error =

[flang] [clang] [Flang] Add code-object-version option (PR #72638)

2023-11-19 Thread Kiran Chandramohan via cfe-commits
@@ -85,6 +85,19 @@ class CodeGenOptions : public CodeGenOptionsBase { RK_WithPattern, // Remark pattern specified via '-Rgroup=regexp'. }; + /// \brief Enumeration value for AMDGPU code object version, which is the + /// code object version times 100. + enum class

[clang] [llvm] [mlir] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68565)

2023-11-15 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan updated https://github.com/llvm/llvm-project/pull/68565 >From 83e20904c206980285c4ee9d0227706803147654 Mon Sep 17 00:00:00 2001 From: Samuel Tebbs Date: Fri, 6 Oct 2023 17:09:36 +0100 Subject: [PATCH 01/13] [AArch64][SME] Remove immediate argument

[flang] [clang] [flang][Driver] Support -rpath, -shared, and -static in the frontend (PR #66702)

2023-11-13 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: @banach-space Is this patch OK with you? https://github.com/llvm/llvm-project/pull/66702 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [flang] [clang] [flang] add fveclib flag (PR #71734)

2023-11-10 Thread Kiran Chandramohan via cfe-commits
@@ -0,0 +1,13 @@ +! test that -fveclib= is passed to the backend +! -target aarch64 so that ArmPL is available +! RUN: %flang -S -target aarch64-unknown-linux-gnu -mcpu=neoverse-v1 -Ofast -fveclib=ArmPL -o - %s | FileCheck %s + kiranchandramohan wrote: I was

[llvm] [clang] [flang] [flang] add fveclib flag (PR #71734)

2023-11-10 Thread Kiran Chandramohan via cfe-commits
@@ -0,0 +1,13 @@ +! test that -fveclib= is passed to the backend +! -target aarch64 so that ArmPL is available +! RUN: %flang -S -target aarch64-unknown-linux-gnu -mcpu=neoverse-v1 -Ofast -fveclib=ArmPL -o - %s | FileCheck %s + kiranchandramohan wrote: Will

[llvm] [clang] [flang] [flang] add fveclib flag (PR #71734)

2023-11-10 Thread Kiran Chandramohan via cfe-commits
@@ -851,11 +851,10 @@ getOutputStream(CompilerInstance , llvm::StringRef inFile, /// \param [in] act Backend act to run (assembly vs machine-code generation) /// \param [in] llvmModule LLVM module to lower to assembly/machine-code /// \param [out] os Output stream to emit the

[llvm] [flang] [clang] [flang] add fveclib flag (PR #71734)

2023-11-10 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan edited https://github.com/llvm/llvm-project/pull/71734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [flang] [flang] add fveclib flag (PR #71734)

2023-11-10 Thread Kiran Chandramohan via cfe-commits
@@ -111,7 +111,7 @@ int main(int argc, const char **argv) { auto Files = llvm::makeIntrusiveRefCnt(FileSystemOptions(), OFS); - auto Driver = std::make_unique( + auto Driver = std::make_unique( kiranchandramohan wrote: Are these clang prefixes

[clang] [llvm] [flang] [flang] add fveclib flag (PR #71734)

2023-11-10 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. Nice work. LGTM. https://github.com/llvm/llvm-project/pull/71734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [flang] add fveclib flag (PR #71734)

2023-11-09 Thread Kiran Chandramohan via cfe-commits
@@ -843,6 +843,44 @@ getOutputStream(CompilerInstance , llvm::StringRef inFile, llvm_unreachable("Invalid action!"); } +static std::unique_ptr +createTLII(llvm::Triple , const CodeGenOptions ) { + auto tlii = std::make_unique(targetTriple); + assert(tlii && "Failed to

[flang] [clang] [flang] add fveclib flag (PR #71734)

2023-11-09 Thread Kiran Chandramohan via cfe-commits
@@ -81,6 +81,17 @@ class CodeGenOptions : public CodeGenOptionsBase { RK_WithPattern, // Remark pattern specified via '-Rgroup=regexp'. }; + enum class VectorLibrary { +NoLibrary, // Don't use any vector library. +Accelerate, // Use the Accelerate framework. +

  1   2   >