[clang] [flang] [flang][OpenMP] Bump default OpenMP version to 3.1 (PR #133745)

2025-04-04 Thread Tom Eccles via cfe-commits
https://github.com/tblah closed https://github.com/llvm/llvm-project/pull/133745 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Added driver options for arrays repacking. (PR #134002)

2025-04-04 Thread Tom Eccles via cfe-commits
@@ -6961,6 +6960,52 @@ defm unsigned : OptInFC1FFlag<"unsigned", "Enables UNSIGNED type">; def fno_automatic : Flag<["-"], "fno-automatic">, Group, HelpText<"Implies the SAVE attribute for non-automatic local objects in subprograms unless RECURSIVE">; +defm repack_arrays +

[clang] [flang] [flang] Added driver options for arrays repacking. (PR #134002)

2025-04-02 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/134002 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Added driver options for arrays repacking. (PR #134002)

2025-04-02 Thread Tom Eccles via cfe-commits
@@ -1687,6 +1700,7 @@ void CompilerInvocation::setLoweringOptions() { const Fortran::common::LangOptions &langOptions = getLangOpts(); loweringOpts.setIntegerWrapAround(langOptions.getSignedOverflowBehavior() == Fortran::common::LangOptio

[clang] [flang] [flang] Added driver options for arrays repacking. (PR #134002)

2025-04-02 Thread Tom Eccles via cfe-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/134002 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][OpenMP] Bump default OpenMP version to 3.1 (PR #133745)

2025-03-31 Thread Tom Eccles via cfe-commits
https://github.com/tblah created https://github.com/llvm/llvm-project/pull/133745 Precise OpenMP standards support information is being documented in #132707 Flang now has good support for OpenMP Version 3.1 and earlier. >From 3bce8b379641d8e91c8e8ae389a113f8d882b14e Mon Sep 17 00:00:00 2001 F

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

2025-03-26 Thread Tom Eccles via cfe-commits
https://github.com/tblah closed https://github.com/llvm/llvm-project/pull/132801 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-03-25 Thread Tom Eccles via cfe-commits
@@ -1,10 +1,15 @@ ! RUN: %flang -### -S -fslp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s ! RUN: %flang -### -S -fno-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s +! RUN: %flang -### -S -O0 %s 2>&1 | FileCheck -check-prefix=C

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

2025-03-24 Thread Tom Eccles via cfe-commits
@@ -0,0 +1,10 @@ +! RUN: %flang -### -S -fslp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s +! RUN: %flang -### -S -fno-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s +! RUN: %flang -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CH

[clang] [flang] [llvm] [mlir] [Transforms] Introduce BuildBuiltins.h atomic helpers (PR #101966)

2025-03-17 Thread Tom Eccles via cfe-commits
@@ -0,0 +1,826 @@ +//===- BuildBuiltins.cpp - Utility builder for builtins ---===// +// +// 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] [llvm] [mlir] [Transforms] Introduce BuildBuiltins.h atomic helpers (PR #101966)

2025-03-17 Thread Tom Eccles via cfe-commits
https://github.com/tblah commented: The idea behind this sounds good to me, and this patch improves flang's test results on the fujitsu testsutie, shows no regressions in the gfortran test suite, and fixes the important remaining flang issues from omp atomic. Atomic support is one of the most

[clang] [flang] [llvm] [mlir] [Transforms] Introduce BuildBuiltins.h atomic helpers (PR #101966)

2025-03-17 Thread Tom Eccles via cfe-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/101966 ___ 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 -f[no-]verbose-asm (PR #130788)

2025-03-13 Thread Tom Eccles via cfe-commits
https://github.com/tblah closed https://github.com/llvm/llvm-project/pull/130788 ___ 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 -f[no-]verbose-asm (PR #130788)

2025-03-13 Thread Tom Eccles via cfe-commits
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/130788 >From 5d3c1cc1d40b308b93cc47c78c6c3ca677f55155 Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Tue, 11 Mar 2025 15:54:35 + Subject: [PATCH 1/4] [flang] Add support for -f[no-]verbose-asm This flag provides ex

[clang] [flang] [flang] Add support for -f[no-]verbose-asm (PR #130788)

2025-03-12 Thread Tom Eccles via cfe-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/130788 ___ 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 -f[no-]verbose-asm (PR #130788)

2025-03-12 Thread Tom Eccles via cfe-commits
tblah wrote: No problem. I have moved it to target options in https://github.com/llvm/llvm-project/pull/130788/commits/6f6f8670887c9eb030412a7eb720242bba2790db https://github.com/llvm/llvm-project/pull/130788 ___ cfe-commits mailing list cfe-commits@l

[clang] [flang] [flang] Add support for -f[no-]verbose-asm (PR #130788)

2025-03-12 Thread Tom Eccles via cfe-commits
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/130788 >From 5d3c1cc1d40b308b93cc47c78c6c3ca677f55155 Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Tue, 11 Mar 2025 15:54:35 + Subject: [PATCH 1/3] [flang] Add support for -f[no-]verbose-asm This flag provides ex

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

2025-03-11 Thread Tom Eccles via cfe-commits
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/129872 >From 3055b89b8ab937bfd4ba70d87e1733b05156d0ac Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Tue, 4 Mar 2025 17:19:53 + Subject: [PATCH 1/3] [mlir][OpenMP] fix crash outlining infinite loop Previously an ex

[clang] [flang] [flang] Add support for -f[no-]verbose-asm (PR #130788)

2025-03-11 Thread Tom Eccles via cfe-commits
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/130788 >From 5d3c1cc1d40b308b93cc47c78c6c3ca677f55155 Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Tue, 11 Mar 2025 15:54:35 + Subject: [PATCH 1/2] [flang] Add support for -f[no-]verbose-asm This flag provides ex

[clang] [flang] [flang] Add support for -f[no-]verbose-asm (PR #130788)

2025-03-11 Thread Tom Eccles via cfe-commits
https://github.com/tblah created https://github.com/llvm/llvm-project/pull/130788 This flag provides extra commentary in the assembly output. It is in CodeGenOptions to match what is done in clang, even though the backend treats it as a target option. >From 5d3c1cc1d40b308b93cc47c78c6c3ca677f

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

2025-03-07 Thread Tom Eccles via cfe-commits
https://github.com/tblah closed https://github.com/llvm/llvm-project/pull/129872 ___ 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] fix crash outlining infinite loop (PR #129872)

2025-03-05 Thread Tom Eccles via cfe-commits
tblah wrote: > The comment mentions the additional edges might come through cancellations, > but what test actually tests cancellation points? Thanks for taking a look. Now I have added clang lit tests (including for cancel) we can see that there are no changes beyond block names and removing

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

2025-03-05 Thread Tom Eccles via cfe-commits
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/129872 >From 3055b89b8ab937bfd4ba70d87e1733b05156d0ac Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Tue, 4 Mar 2025 17:19:53 + Subject: [PATCH 1/2] [mlir][OpenMP] fix crash outlining infinite loop Previously an ex

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

2025-02-24 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. LGTM thanks https://github.com/llvm/llvm-project/pull/126026 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-02-19 Thread Tom Eccles via cfe-commits
https://github.com/tblah commented: Thank you for up-streaming this https://github.com/llvm/llvm-project/pull/126026 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-02-19 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/119718 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-02-19 Thread Tom Eccles via cfe-commits
@@ -0,0 +1,155 @@ + + +# `DO CONCURRENT` mapping to OpenMP + +```{contents} +--- +local: +--- +``` + +This document seeks to describe the effort to parallelize `do concurrent` loops +by mapping them to OpenMP worksharing constructs. The goals of this document +are: +* Describing h

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

2025-02-19 Thread Tom Eccles via cfe-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/126026 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-02-19 Thread Tom Eccles via cfe-commits
@@ -0,0 +1,155 @@ + + +# `DO CONCURRENT` mapping to OpenMP + +```{contents} +--- +local: +--- +``` + +This document seeks to describe the effort to parallelize `do concurrent` loops +by mapping them to OpenMP worksharing constructs. The goals of this document +are: +* Describing h

[clang] [flang] [flang][Driver] When linking with the Fortran runtime also link with libexecinfo (PR #125998)

2025-02-06 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. Thanks for coming back to this @brad0 https://github.com/llvm/llvm-project/pull/125998 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

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

2025-01-20 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. LGTM. As I understand it the test failures were fixed by https://github.com/llvm/llvm-project/pull/123364 https://github.com/llvm/llvm-project/pull/123606 ___ cfe-commits mailing list cfe-commits@li

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

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

[clang] [flang] [llvm] [mlir] [MLIR][OpenMP] Lowering aligned clause to LLVM IR for SIMD directive (PR #119536)

2025-01-02 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/119536 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Integrate the option -flang-experimental-integer-overflow into -fno-wrapv (PR #110063)

2024-12-18 Thread Tom Eccles via cfe-commits
tblah wrote: > Hello! Did anyone notice a performance regression after this PR on exchange2? > I see it on both EPYC 9684X and grace. The slowdown is more than 1.5x. > > I verified that performance restores when adding `-fwrapv` with the latest > flang compiler. The compilation options are `-O

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

2024-12-13 Thread Tom Eccles via cfe-commits
@@ -6980,3 +6980,37 @@ void driver::applyOverrideOptions(SmallVectorImpl &Args, ++S; } } + +/// Vectorize at all optimization levels greater than 1 except for -Oz. +/// For -Oz the loop vectorizer is disabled, while the slp vectorizer is +/// enabled. +bool driver::shou

[clang] [flang] Reland "[flang] Integrate the option -flang-experimental-integer-overflow into -fno-wrapv" (PR #118933)

2024-12-06 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. Thanks for your patience and for bringing this back! https://github.com/llvm/llvm-project/pull/118933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [flang] [flang] Integrate the option -flang-experimental-integer-overflow into -fno-wrapv (PR #110063)

2024-12-05 Thread Tom Eccles via cfe-commits
tblah wrote: Hi @yus3710-fj, thanks for investigating the cause of the regression. There was a recent patch which improved bwaves performance: https://github.com/llvm/llvm-project/pull/111853. It seems that since this patch, I no longer see a regression with the integer overflow enabled so I

[clang] [flang] [Flang] LoongArch64 support for BIND(C) derived types in mabi=lp64d. (PR #117108)

2024-11-27 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. The code changes look good to me. I am not at all familiar with LoongArch64 so it would be best if somebody else reviews that this implements the ABI correctly. https://github.com/llvm/llvm-project/pull/117108 ___

[clang] [flang] [Flang] LoongArch64 support for BIND(C) derived types in mabi=lp64d. (PR #117108)

2024-11-26 Thread Tom Eccles via cfe-commits
@@ -1151,6 +1154,311 @@ struct TargetLoongArch64 : public GenericTarget { return GenericTarget::integerArgumentType(loc, argTy); } + + /// Flatten non-basic types, resulting in an array of types containing only + /// `IntegerType` and `FloatType`. + std::vector flatt

[clang] [flang] [Flang] LoongArch64 support for BIND(C) derived types in mabi=lp64d. (PR #117108)

2024-11-26 Thread Tom Eccles via cfe-commits
@@ -1151,6 +1154,311 @@ struct TargetLoongArch64 : public GenericTarget { return GenericTarget::integerArgumentType(loc, argTy); } + + /// Flatten non-basic types, resulting in an array of types containing only + /// `IntegerType` and `FloatType`. + std::vector flatt

[clang] [flang] [Flang] LoongArch64 support for BIND(C) derived types in mabi=lp64d. (PR #117108)

2024-11-26 Thread Tom Eccles via cfe-commits
@@ -1151,6 +1154,311 @@ struct TargetLoongArch64 : public GenericTarget { return GenericTarget::integerArgumentType(loc, argTy); } + + /// Flatten non-basic types, resulting in an array of types containing only + /// `IntegerType` and `FloatType`. + std::vector flatt

[clang] [flang] [Flang] LoongArch64 support for BIND(C) derived types in mabi=lp64d. (PR #117108)

2024-11-26 Thread Tom Eccles via cfe-commits
@@ -1151,6 +1154,311 @@ struct TargetLoongArch64 : public GenericTarget { return GenericTarget::integerArgumentType(loc, argTy); } + + /// Flatten non-basic types, resulting in an array of types containing only + /// `IntegerType` and `FloatType`. + std::vector flatt

[clang] [flang] [Flang] LoongArch64 support for BIND(C) derived types in mabi=lp64d. (PR #117108)

2024-11-26 Thread Tom Eccles via cfe-commits
@@ -1151,6 +1154,311 @@ struct TargetLoongArch64 : public GenericTarget { return GenericTarget::integerArgumentType(loc, argTy); } + + /// Flatten non-basic types, resulting in an array of types containing only + /// `IntegerType` and `FloatType`. + std::vector flatt

[clang] [flang] [clang][driver] When -fveclib=ArmPL flag is in use, always link against libamath (PR #116432)

2024-11-19 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. This looks good to me but please don't merge without agreement on this approach from the other reviewers. https://github.com/llvm/llvm-project/pull/116432 ___ cfe-commits mailing list cfe-commits@li

[clang] [flang] [clang][driver] When -fveclib=ArmPL flag is in use, always link against libamath (PR #116432)

2024-11-18 Thread Tom Eccles via cfe-commits
@@ -490,6 +490,16 @@ void tools::AddLinkerInputs(const ToolChain &TC, const InputInfoList &Inputs, else A.renderAsInput(Args, CmdArgs); } + if (const Arg *A = Args.getLastArg(options::OPT_fveclib)) { +if (A->getNumValues() == 1) { + StringRef V = A->getVa

[clang] [flang] [clang][driver] When -fveclib=ArmPL flag is in use, always link against libamath (PR #116432)

2024-11-18 Thread Tom Eccles via cfe-commits
@@ -490,6 +490,16 @@ void tools::AddLinkerInputs(const ToolChain &TC, const InputInfoList &Inputs, else A.renderAsInput(Args, CmdArgs); } + if (const Arg *A = Args.getLastArg(options::OPT_fveclib)) { +if (A->getNumValues() == 1) { + StringRef V = A->getVa

[clang] [flang] [flang] Support -mabi=vec-extabi and -mabi=vec-default on AIX (PR #113215)

2024-10-29 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. LGTM thanks https://github.com/llvm/llvm-project/pull/113215 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] Revert "[flang] Integrate the option -flang-experimental-integer-overflow into -fno-wrapv" (PR #113901)

2024-10-28 Thread Tom Eccles via cfe-commits
https://github.com/tblah closed https://github.com/llvm/llvm-project/pull/113901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] Revert "[flang] Integrate the option -flang-experimental-integer-overflow into -fno-wrapv" (PR #113901)

2024-10-28 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/113901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Integrate the option -flang-experimental-integer-overflow into -fno-wrapv (PR #110063)

2024-10-28 Thread Tom Eccles via cfe-commits
tblah wrote: @yus3710-fj after this patch we get a 7-10% slowdown for 503.bwaves_r from SPEC2017. I built with `-Ofast -mcpu=native -fuse-ld=lld -flto` As I understood it, the previous patch was supposed to enable your transformation by default, and this one was only supposed to clean up old

[clang] [llvm] [mlir] [OpenMP][OMPIRBuilder] Error propagation across callbacks (PR #112533)

2024-10-23 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. LGTM. Thanks for the extensive cleanup https://github.com/llvm/llvm-project/pull/112533 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [flang] [flang] Support -mabi=vec-extabi and -mabi=vec-default on AIX (PR #113215)

2024-10-22 Thread Tom Eccles via cfe-commits
@@ -203,6 +203,30 @@ void Flang::AddAArch64TargetArgs(const ArgList &Args, } } +void Flang::AddPPCTargetArgs(const ArgList &Args, + ArgStringList &CmdArgs) const { + bool VecExtabi = false; + for (const Arg *A : Args.filtered(options::OPT_mabi_E

[clang] [llvm] [mlir] [OpenMP][OMPIRBuilder] Error propagation across callbacks (PR #112533)

2024-10-22 Thread Tom Eccles via cfe-commits
@@ -1171,12 +1179,15 @@ void OpenMPIRBuilder::emitCancelationCheckImpl(Value *CancelFlag, // post finalization block that is known to the FiniCB callback. Builder.SetInsertPoint(CancellationBlock); if (ExitCB) -ExitCB(Builder.saveIP()); +if (Error Err = ExitCB(Bu

[clang] [llvm] [mlir] [OpenMP][OMPIRBuilder] Error propagation across callbacks (PR #112533)

2024-10-22 Thread Tom Eccles via cfe-commits
@@ -1496,7 +1507,8 @@ IRBuilder<>::InsertPoint OpenMPIRBuilder::createParallel( // Let the caller create the body. assert(BodyGenCB && "Expected body generation callback!"); InsertPointTy CodeGenIP(PRegBodyBB, PRegBodyBB->begin()); - BodyGenCB(InnerAllocaIP, CodeGenIP);

[clang] [flang] [flang] Integrate the option -flang-experimental-integer-overflow into -fno-wrapv (PR #110063)

2024-10-21 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. Thanks! LGTM https://github.com/llvm/llvm-project/pull/110063 ___ 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 -f[no-]wrapv and -f[no]-strict-overflow in the frontend (PR #110061)

2024-10-15 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. This looks good to me, thanks! https://github.com/llvm/llvm-project/pull/110061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-10-14 Thread Tom Eccles via cfe-commits
@@ -194,11 +197,29 @@ int Compilation::ExecuteCommand(const Command &C, if (LogOnly) return 0; + // We don't use any timers or llvm::TimeGroup's because those are tied into + // the global static timer list which, in principle, could be cleared without + // us knowing

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

2024-10-14 Thread Tom Eccles via cfe-commits
@@ -194,11 +197,29 @@ int Compilation::ExecuteCommand(const Command &C, if (LogOnly) return 0; + // We don't use any timers or llvm::TimeGroup's because those are tied into + // the global static timer list which, in principle, could be cleared without + // us knowing

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

2024-10-14 Thread Tom Eccles via cfe-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/109165 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-10-14 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. Thanks for this! https://github.com/llvm/llvm-project/pull/109165 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Link to libatomic with openmp and rtlib=libgcc (PR #112202)

2024-10-14 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. LGTM thanks! https://github.com/llvm/llvm-project/pull/112202 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-10-10 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/110132 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [openmp] [flang][driver] rename flang-new to flang (PR #110023)

2024-10-04 Thread Tom Eccles via cfe-commits
@@ -787,6 +787,9 @@ void Flang::ConstructJob(Compilation &C, const JobAction &JA, if (Args.hasArg(options::OPT_fopenmp_force_usm)) CmdArgs.push_back("-fopenmp-force-usm"); + // TODO: OpenMP support isn't "done" yet, so for now we warn that it + // is e

[clang] [flang] [flang][driver] Make -stdlib= option visible to flang and silently ignored by it (PR #110598)

2024-10-03 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. LGTM but if possible please wait for another reviewer https://github.com/llvm/llvm-project/pull/110598 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [flang] [flang][driver] Make -stdlib= option visible to flang and silently ignored by it (PR #110598)

2024-10-03 Thread Tom Eccles via cfe-commits
tblah wrote: We discussed this further offline and I am now convinced there could be a valid usecase for this. Some C++ code might use header-only parts of the C++ standard library. Setting `-stdlib=` will effect the include paths clang uses for stdlib when compiling. When flang links the pro

[clang] [flang] [flang][driver] Make -stdlib= option visible to flang and silently ignored by it (PR #110598)

2024-10-03 Thread Tom Eccles via cfe-commits
tblah wrote: If this is completely ignored and does not effect the link line, are you sure the resulting binary actually uses the right c++ library? https://github.com/llvm/llvm-project/pull/110598 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [flang] [flang][driver] Make -stdlib= option visible to flang and silently ignored by it (PR #110598)

2024-10-02 Thread Tom Eccles via cfe-commits
@@ -0,0 +1,48 @@ +// REQUIRES: system-linux tblah wrote: I'm not sure about this test. Usually we would go about testing something like this by running FileCheck on the output of `flang-new -###` to see what is passed to the linker (and that the linker gets cal

[clang] [flang] [flang][driver] Make -stdlib= option visible to flang and silently ignored by it (PR #110598)

2024-10-02 Thread Tom Eccles via cfe-commits
tblah wrote: I don't think it is correct to say that the option was ignored. It may still be read by the compiler driver (which generates the link line). In fact it probably *should* be processed by the compiler driver in order to set the C++ standard library correctly - otherwise you could ju

[clang] [flang] [Flang][Driver][Offload] Support -Xoffload-linker argument in Flang (PR #109907)

2024-09-25 Thread Tom Eccles via cfe-commits
tblah wrote: The CI failures look relevant. The problem isn't immediately apparent to me from the diff (which looks good to me). https://github.com/llvm/llvm-project/pull/109907 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [flang] [Flang][Driver] Enable the -B option (PR #109965)

2024-09-25 Thread Tom Eccles via cfe-commits
@@ -0,0 +1,23 @@ +! Check -B driver option. +! +! Target triple prefix is not detected for -B. +! RUN: %flang %s -### -o %t.o -target i386-unknown-linux \ +! RUN: -B %S/Inputs/B_opt_tree/dir1 -fuse-ld=ld 2>&1 \ +! RUN: | FileCheck --check-prefix=CHECK-B-OPT-TRIPLE %s +! CHEC

[clang] [flang] [Flang][Driver] Enable the -B option (PR #109965)

2024-09-25 Thread Tom Eccles via cfe-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/109965 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [Flang][Driver] Enable the -B option (PR #109965)

2024-09-25 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/109965 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-09-19 Thread Tom Eccles via cfe-commits
https://github.com/tblah commented: Is `-fdiagnostics-color=auto` too host-environment dependent to test? https://github.com/llvm/llvm-project/pull/109210 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

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

2024-09-17 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. LGTM, thanks https://github.com/llvm/llvm-project/pull/108868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] Support -Xlinker in flang (PR #107472)

2024-09-09 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. Thanks for the updates. LGTM https://github.com/llvm/llvm-project/pull/107472 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] Support -Xlinker in flang (PR #107472)

2024-09-09 Thread Tom Eccles via cfe-commits
@@ -0,0 +1,8 @@ +! RUN: %flang -### -o /dev/null %s -Xlinker -rpath=/not/a/real/path 2>&1 | FileCheck --check-prefix=SINGLE %s +! RUN: %flang -### -o /dev/null %s -Xlinker -rpath -Xlinker /not/a/real/path 2>&1 | FileCheck --check-prefix=MULTIPLE %s + + +! SINGLE: "-rpath=/not/a/

[clang] [flang] [flang][Driver] Support -Xlinker in flang (PR #107472)

2024-09-06 Thread Tom Eccles via cfe-commits
@@ -0,0 +1,6 @@ +! RUN: %flang -### -o /dev/null %s -Xlinker -rpath=/not/a/real/path 2>&1 | FileCheck %s + +! CHECK: "-fc1" +! CHECK-NEXT: "-rpath=/not/a/real/path" tblah wrote: nit: maybe I'm being overly pedantic here, but I think the meaning of the test woul

[clang] [flang] [flang][Driver] Support -Xlinker in flang (PR #107472)

2024-09-06 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. https://github.com/llvm/llvm-project/pull/107472 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] Support --no-warnings option (PR #107455)

2024-09-06 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/107455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] Preliminary support for -ftime-report (PR #107270)

2024-09-05 Thread Tom Eccles via cfe-commits
https://github.com/tblah commented: Thanks for the quick updates. I don't have any idea off the top of my head how to fix the LLVM timings. Do any other reviewers have thoughts/experience in this area? https://github.com/llvm/llvm-project/pull/107270 ___

[clang] [flang] [flang][Driver] Preliminary support for -ftime-report (PR #107270)

2024-09-05 Thread Tom Eccles via cfe-commits
@@ -176,6 +205,26 @@ bool CompilerInstance::executeAction(FrontendAction &act) { act.endSourceFile(); } } + + if (timingMgr.isEnabled()) { +timingScopeRoot.stop(); + +// Write the timings to the associated output stream and clear all timers. +// We need

[clang] [flang] [flang][Driver] Preliminary support for -ftime-report (PR #107270)

2024-09-05 Thread Tom Eccles via cfe-commits
@@ -4,6 +4,7 @@ add_subdirectory(Decimal) add_subdirectory(Lower) add_subdirectory(Parser) add_subdirectory(Semantics) +add_subdirectory(Support) tblah wrote: Why did you decide to put this in a new subdirectory and not just part of Frontend? Is there a plan

[clang] [flang] [flang][Driver] Preliminary support for -ftime-report (PR #107270)

2024-09-05 Thread Tom Eccles via cfe-commits
@@ -143,6 +144,14 @@ class CompilerInvocation : public CompilerInvocationBase { }, }; + /// Whether to time the invocation. Set when -ftime-report or -ftime-report= + /// is enabled. + bool enableTimers; + + /// Whether to report the timing of each run of an LLVM p

[clang] [flang] [flang][Driver] Preliminary support for -ftime-report (PR #107270)

2024-09-05 Thread Tom Eccles via cfe-commits
@@ -0,0 +1,18 @@ +! Check that -ftime-report flag is passed as-is to fc1. The value of the flag +! is only checked there. This behavior intentionally mirrors that of clang. +! +! -ftime-report= is currently not supported because we do not support detailed +! timing information on

[clang] [flang] [flang][Driver] Preliminary support for -ftime-report (PR #107270)

2024-09-05 Thread Tom Eccles via cfe-commits
https://github.com/tblah commented: Thanks for working on this https://github.com/llvm/llvm-project/pull/107270 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] Preliminary support for -ftime-report (PR #107270)

2024-09-05 Thread Tom Eccles via cfe-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/107270 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] Preliminary support for -ftime-report (PR #107270)

2024-09-05 Thread Tom Eccles via cfe-commits
@@ -254,6 +276,43 @@ class CompilerInstance { /// Produces the string which represents target feature std::string getTargetFeatures(); + /// { + /// @name Timing + /// @{ + bool isTimingEnabled() { return timingMgr.isEnabled(); } tblah wrote: nit: Do

[clang] [flang] Allow disabling of types from the command line (PR #107126)

2024-09-04 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. I agree with other reviewers that a generic option would be better than a list of particular types. But for me that's just a nit because these are hidden debug options anyway https://github.com/llvm/llvm-project/pull/107126 _

[clang] [flang] [flang][Driver] support -fno-openmp (PR #107087)

2024-09-04 Thread Tom Eccles via cfe-commits
https://github.com/tblah closed https://github.com/llvm/llvm-project/pull/107087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] support -fno-openmp (PR #107087)

2024-09-03 Thread Tom Eccles via cfe-commits
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/107087 >From 10a0bc5c82ef820593528c034c26cd1f5c90d6e5 Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Tue, 3 Sep 2024 11:11:47 + Subject: [PATCH 1/3] [flang][Driver] support -fno-openmp Closes #83148 --- clang/incl

[clang] [flang] [flang][Driver] support -fno-openmp (PR #107087)

2024-09-03 Thread Tom Eccles via cfe-commits
tblah wrote: > As I'm not seeing how linker is invoked, I just need to ask (for the sake of > completeness) will it also prevent addition of `-lomp` to the linker's > command line? Thanks for pointing this out. I've added a test for the linker invocation. https://github.com/llvm/llvm-project/

[clang] [flang] [flang][Driver] support -fno-openmp (PR #107087)

2024-09-03 Thread Tom Eccles via cfe-commits
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/107087 >From 10a0bc5c82ef820593528c034c26cd1f5c90d6e5 Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Tue, 3 Sep 2024 11:11:47 + Subject: [PATCH 1/2] [flang][Driver] support -fno-openmp Closes #83148 --- clang/incl

[clang] [flang] [flang][Driver] support -fno-openmp (PR #107087)

2024-09-03 Thread Tom Eccles via cfe-commits
https://github.com/tblah created https://github.com/llvm/llvm-project/pull/107087 Closes #83148 >From 10a0bc5c82ef820593528c034c26cd1f5c90d6e5 Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Tue, 3 Sep 2024 11:11:47 + Subject: [PATCH] [flang][Driver] support -fno-openmp Closes #83148 ---

[clang] [flang] [Flang][Driver] Introduce -fopenmp-targets offloading option (PR #100152)

2024-07-23 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. Code changes look good to me. I can't speak to the needs of anyone else using offloading. I see this is copied exactly from `Toolchains/Clang.cpp`. I think that's okay for such a small bit of code. https://github.com/llvm/llvm-project/pull/

[clang] [flang] [flang] Add -rtlib flag (PR #99058)

2024-07-16 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/99058 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Implement -mcmodel flag (PR #95411)

2024-07-02 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. LGTM. Thanks for picking this up Mats. Ideally, wait for @Thirumalai-Shaktivel to have another look before merging. https://github.com/llvm/llvm-project/pull/95411 ___ cfe-commits mailing list cfe-c

[clang] [flang] [flang] Implement -mcmodel flag (PR #95411)

2024-07-02 Thread Tom Eccles via cfe-commits
@@ -21,4 +22,14 @@ CodeGenOptions::CodeGenOptions() { #include "flang/Frontend/CodeGenOptions.def" } +std::optional getCodeModel(llvm::StringRef string) { + return llvm::StringSwitch>(string) + .Case("tiny", llvm::CodeModel::Model::Tiny) + .Case("small", llvm::CodeM

[clang] [flang] [Flang-new][OpenMP] Add bitcode files for AMD GPU OpenMP (PR #96742)

2024-07-02 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. I think this is okay. I don't want to block the PR on diagnostics for an FC1 flag which aren't present in clang. LGTM and thanks for answering my questions. Please also wait for @banach-space's approval. https://github.com/llvm/llvm-project/

[clang] [flang] [Flang] Re-enable -print-resource-dir compiler option (PR #96799)

2024-06-28 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. @DavidTruby is on holiday We have tested this on our end and it does not re-introduce the issue. Thanks for the revert & fix! https://github.com/llvm/llvm-project/pull/96799 ___ cfe-commits mailing

[clang] [flang] [Flang-new][OpenMP] Add offload related flags for AMDGPU (PR #96742)

2024-06-27 Thread Tom Eccles via cfe-commits
@@ -333,6 +333,9 @@ void Flang::AddAMDGPUTargetArgs(const ArgList &Args, StringRef Val = A->getValue(); CmdArgs.push_back(Args.MakeArgString("-mcode-object-version=" + Val)); } + + const ToolChain &TC = getToolChain(); + TC.addClangTargetOptions(Args, CmdArgs, Actio

  1   2   3   >