[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. +

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

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

[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

[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 required?

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

2023-11-10 Thread Kiran Chandramohan via cfe-commits
@@ -851,11 +851,10 @@ getOutputStream(CompilerInstance &ci, 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 t

[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 this

[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 ask

[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

[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

[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" +#ifdef

[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

[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 restrictio

[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 Cod

[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, &value, nullptr, nullptr, __FILE__, __LINE__); } + +void FORTRAN_PROCEDURE_NAME(getlog)(std::int8_t *arg, std::int64_t length) { + std::array str = {}; + + int error = getlogi

[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 "flang/Runtim

[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 &TC, ArgStringList &CmdArgs) { // Default to the /../lib directory. This works fine on the // platforms that we have tested so far. We will probably have

[llvm] [mlir] [libcxx] [clang] [lldb] [flang] [Flang][OpenMP] Port openmp threadprivate-use-association.f90 test to HLFIR flow (PR #71043)

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

[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 bi

[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) ///< Le

[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, opts.AliasAnalysis = opts.OptimizationLevel > 0; + if (const llvm::opt::Arg *a = + args.getLastArg(clang::driver::options::OPT_mframe_pointer_EQ)) { +llvm::StringRef s

[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: Apache

[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 th

[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 when

[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: https://github.com/llvm/llvm-proje

[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][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-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 https://lists.llvm.org/cgi-bin/mailman/li

[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 &Args, if (shouldLoopVersion(Args)) CmdArgs.push_back("-fversion-loops-for-stride"); + Arg *aliasAnalysis = Args.getLastArg(options::OPT_falias_analysis, + options::OP

[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

[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

[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 &Args, if (shouldLoopVersion(Args)) CmdArgs.push_back("-fversion-loops-for-stride"); + Arg *aliasAnalysis = Args.getLastArg(options::OPT_falias_analysis, + options::OP

[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 https://lists.llvm.org/cgi-bin/mailman/li

[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

[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

[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. https://github

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

[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: Ap

[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 &OS) { static void emitNeonTypeDefs(const std::string& types, raw_ostream &OS) { std::string TypedefTypes(types); std::vector TDTypeVec = TypeSpec::fromTypeSpecs(TypedefTypes); + // arm_sve.h followed by arm_ne

[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) { OS << "#endif /* __ARM_FP16_H */\n"; } +void NeonEmitter::runVectorType(raw_ostream &OS) { + 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 &OS) { static void emitNeonTypeDefs(const std::string& types, raw_ostream &OS) { std::string TypedefTypes(types); std::vector TDTypeVec = TypeSpec::fromTypeSpecs(TypedefTypes); + // arm_sve.h followed by arm_ne

[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

[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 ex

[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 https://lists.llvm.org/cgi-bin/mailman/listinfo/

[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 ex

[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

[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, opts.AliasAnalysis = opts.OptimizationLevel > 0; + if (const llvm::opt::Arg *a = + args.getLastArg(clang::driver::options::OPT_mframe_pointer_EQ)) { +llvm::StringRef s

[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

[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 at

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

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

[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 &C, const JobAction &JA, CmdArgs.push_back(Args.MakeArgString(TripleStr)); if (isa(JA)) { - CmdArgs.push_back("-E"); +CmdArgs.push_back("-E"); kiranchandramohan wrote: Nit: accidental chan

[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 &TC, Compilation &C, } } } + +void tools::addOutlineAtomicsArgs(const Driver &D, const ToolChain &TC, const llvm::opt::ArgList &Args, llvm::opt::ArgStringList & CmdArgs, const llvm::Triple &Triple)

[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 &D, const llvm::opt::ArgList &Args, void addOpenMPDeviceRTL(const Driver &D, const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args, StringRef Bitcod

[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 &opts, llvm::opt::ArgList &args) { for (const llvm::opt::Arg *currentArg : args.filtered(clang::driver::options::OPT_target_feature)) opts.featuresAsWritten.emplace_back(currentArg->getValue()); + + l

[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 &D, const llvm::opt::ArgList &Args, void addOpenMPDeviceRTL(const Driver &D, const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args, StringRef Bitcod

[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-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. https://github.com/ll

[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 https://lists.llvm.org/c

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

[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 &eval, int collapseValue) { + // Return the Evaluation of the innermost collapsed loop, or the current + // evaluation, if

[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 &TC, const ArgList &Args, // TODO: Find an equivalent of `--whole-archive` for Darwin and AIX. if (!isWholeArchivePresent(Args) && !TC.getTriple().isMacOSX() && !TC.getTriple().isOSAIX()) { +// Add

[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

[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

[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

[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 wor

[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

[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] 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 &args = {}, bool outerCombined = false, DataSharingProcessor *dsp = nullptr) { fir::FirOpBuilder &firOpBuilder = converter.getFirOpBuilder(); + + auto insertMarker = [](fir::FirOpBuilder &bui

[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); -

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

[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

[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] [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);

[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 --t

[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 &Args, CmdArgs.push_back(Args.MakeArgString(CPU)); } + if (Arg *A = Args.getLastArg(options::OPT_moutline_atomics, + options::OPT_mno_outline_atomics)) { +// Option -moutli

[clang] c551ba0 - Run test only if X86 target is available

2020-10-26 Thread Kiran Chandramohan via cfe-commits
Author: Kiran Chandramohan Date: 2020-10-26T21:28:59Z New Revision: c551ba0e90bd2b49ef501d591f8362ba44e5484d URL: https://github.com/llvm/llvm-project/commit/c551ba0e90bd2b49ef501d591f8362ba44e5484d DIFF: https://github.com/llvm/llvm-project/commit/c551ba0e90bd2b49ef501d591f8362ba44e5484d.diff

[clang] a784de7 - [flang] Add -ffp-contract option processing

2022-10-31 Thread Kiran Chandramohan via cfe-commits
Author: Tom Eccles Date: 2022-10-31T11:32:31Z New Revision: a784de783af5096e593c5e214c2c78215fe303f5 URL: https://github.com/llvm/llvm-project/commit/a784de783af5096e593c5e214c2c78215fe303f5 DIFF: https://github.com/llvm/llvm-project/commit/a784de783af5096e593c5e214c2c78215fe303f5.diff LOG: [f

[clang] cd86a03 - [clang,flang] Add help text for -fsyntax-only

2022-08-19 Thread Kiran Chandramohan via cfe-commits
Author: Alexander Malkov Date: 2022-08-19T09:54:29Z New Revision: cd86a03246a2df350c2f694457f1ce946cf65663 URL: https://github.com/llvm/llvm-project/commit/cd86a03246a2df350c2f694457f1ce946cf65663 DIFF: https://github.com/llvm/llvm-project/commit/cd86a03246a2df350c2f694457f1ce946cf65663.diff L

[libunwind] [mlir][OpenMP] Added translation for `omp.teams` to LLVM IR (PR #68042)

2023-10-03 Thread Kiran Chandramohan via cfe-commits
@@ -0,0 +1,136 @@ +// RUN: mlir-translate -mlir-to-llvmir -split-input-file %s | FileCheck %s + +llvm.func @foo() + +// CHECK-LABEL: @omp_teams_simple +// CHECK: call void {{.*}} @__kmpc_fork_teams(ptr @{{.+}}, i32 0, ptr [[wrapperfn:.+]]) kiranchandramohan wrote

[clang] [mlir][OpenMP] Added translation for `omp.teams` to LLVM IR (PR #68042)

2023-10-03 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. LGTM. Will the wrapper function stay or be removed? https://github.com/llvm/llvm-project/pull/68042 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[libunwind] [mlir][OpenMP] Added translation for `omp.teams` to LLVM IR (PR #68042)

2023-10-03 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. LGTM. Will the wrapper function stay or be removed? https://github.com/llvm/llvm-project/pull/68042 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [mlir][OpenMP] Added translation for `omp.teams` to LLVM IR (PR #68042)

2023-10-03 Thread Kiran Chandramohan via cfe-commits
@@ -0,0 +1,136 @@ +// RUN: mlir-translate -mlir-to-llvmir -split-input-file %s | FileCheck %s + +llvm.func @foo() + +// CHECK-LABEL: @omp_teams_simple +// CHECK: call void {{.*}} @__kmpc_fork_teams(ptr @{{.+}}, i32 0, ptr [[wrapperfn:.+]]) kiranchandramohan wrote

[clang-tools-extra] [OpenMPIRBuilder] Remove wrapper function in `createTask`, `createTeams` (PR #67723)

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

[clang-tools-extra] [OpenMPIRBuilder] Remove wrapper function in `createTask`, `createTeams` (PR #67723)

2023-10-05 Thread Kiran Chandramohan via cfe-commits
@@ -5748,6 +5758,7 @@ OpenMPIRBuilder::createTeams(const LocationDescription &Loc, BasicBlock *BodyBB = splitBB(Builder, /*CreateBranch=*/true, "teams.entry"); Builder.SetInsertPoint(BodyBB, BodyBB->begin()); } + InsertPointTy OuterAllocaIP(&OuterAllocaBB, OuterAll

[clang] [OpenMPIRBuilder] Remove wrapper function in `createTask`, `createTeams` (PR #67723)

2023-10-05 Thread Kiran Chandramohan via cfe-commits
@@ -5748,6 +5758,7 @@ OpenMPIRBuilder::createTeams(const LocationDescription &Loc, BasicBlock *BodyBB = splitBB(Builder, /*CreateBranch=*/true, "teams.entry"); Builder.SetInsertPoint(BodyBB, BodyBB->begin()); } + InsertPointTy OuterAllocaIP(&OuterAllocaBB, OuterAll

[clang-tools-extra] [OpenMPIRBuilder] Remove wrapper function in `createTask`, `createTeams` (PR #67723)

2023-10-05 Thread Kiran Chandramohan via cfe-commits
@@ -340,6 +340,44 @@ BasicBlock *llvm::splitBBWithSuffix(IRBuilderBase &Builder, bool CreateBranch, return splitBB(Builder, CreateBranch, Old->getName() + Suffix); } +// This function creates a fake integer value and a fake use for the integer +// value. It returns the fake

[libunwind] [OpenMPIRBuilder] Remove wrapper function in `createTask`, `createTeams` (PR #67723)

2023-10-05 Thread Kiran Chandramohan via cfe-commits
@@ -340,6 +340,44 @@ BasicBlock *llvm::splitBBWithSuffix(IRBuilderBase &Builder, bool CreateBranch, return splitBB(Builder, CreateBranch, Old->getName() + Suffix); } +// This function creates a fake integer value and a fake use for the integer +// value. It returns the fake

[clang] [OpenMPIRBuilder] Remove wrapper function in `createTask`, `createTeams` (PR #67723)

2023-10-05 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan commented: Could you expand the summary to describe the changes. What are the changes required to remove the wrapper function (Why was it required in the first place?) Why are the fake vals necessary? https://github.com/llvm/llvm-project/pull/67723

[libunwind] [OpenMPIRBuilder] Remove wrapper function in `createTask`, `createTeams` (PR #67723)

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

[clang] [OpenMPIRBuilder] Remove wrapper function in `createTask`, `createTeams` (PR #67723)

2023-10-05 Thread Kiran Chandramohan via cfe-commits
@@ -340,6 +340,44 @@ BasicBlock *llvm::splitBBWithSuffix(IRBuilderBase &Builder, bool CreateBranch, return splitBB(Builder, CreateBranch, Old->getName() + Suffix); } +// This function creates a fake integer value and a fake use for the integer +// value. It returns the fake

[libunwind] [OpenMPIRBuilder] Remove wrapper function in `createTask`, `createTeams` (PR #67723)

2023-10-05 Thread Kiran Chandramohan via cfe-commits
@@ -5748,6 +5758,7 @@ OpenMPIRBuilder::createTeams(const LocationDescription &Loc, BasicBlock *BodyBB = splitBB(Builder, /*CreateBranch=*/true, "teams.entry"); Builder.SetInsertPoint(BodyBB, BodyBB->begin()); } + InsertPointTy OuterAllocaIP(&OuterAllocaBB, OuterAll

[clang-tools-extra] [OpenMPIRBuilder] Remove wrapper function in `createTask`, `createTeams` (PR #67723)

2023-10-05 Thread Kiran Chandramohan via cfe-commits
@@ -340,6 +340,44 @@ BasicBlock *llvm::splitBBWithSuffix(IRBuilderBase &Builder, bool CreateBranch, return splitBB(Builder, CreateBranch, Old->getName() + Suffix); } +// This function creates a fake integer value and a fake use for the integer +// value. It returns the fake

  1   2   3   >