[flang] [clang] [clang-tools-extra] [llvm] [flang] add SYSTEM runtime and lowering intrinsics support (PR #74309)

2024-01-29 Thread Tom Eccles via cfe-commits
@@ -5934,6 +5938,40 @@ IntrinsicLibrary::genSum(mlir::Type resultType, resultType, args); } +// SYSTEM +void IntrinsicLibrary::genSystem(llvm::ArrayRef args) { + assert(args.size() == 2); + mlir::Value command = fir::getBase(args[0]); + const fir::Exte

[clang-tools-extra] [flang] [clang] [llvm] [flang] add SYSTEM runtime and lowering intrinsics support (PR #74309)

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

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

2024-01-30 Thread Tom Eccles via cfe-commits
tblah wrote: This patch also needs to remove the TODO here https://github.com/llvm/llvm-project/blob/ef67f63fa5f950f4056b5783e92e137342805d74/flang/lib/Lower/OpenMP.cpp#L3550 https://github.com/llvm/llvm-project/pull/78268 ___ cfe-commits mailing list

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

2024-01-12 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. LGTM, this does fix the bug. Thanks! 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-commit

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

2024-01-15 Thread Tom Eccles via cfe-commits
https://github.com/tblah created https://github.com/llvm/llvm-project/pull/78152 Currently, `flang-new -lFortran_main` will fail on multiple definitions of `main`. I can understand there might be differing opinions on whether this is actually a bug. My thinking is that `-lFortran_main` should

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

2024-01-15 Thread Tom Eccles via cfe-commits
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/78152 >From 5c7fa9c3ef911674e5b6888fcba4289834d04fda Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Mon, 15 Jan 2024 11:27:46 + Subject: [PATCH 1/2] [flang][driver] Allow explicit specification of -lFortran_main I

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

2024-01-15 Thread Tom Eccles via cfe-commits
tblah wrote: I agree that the documentation says not to do this, but existing common build configurations are doing it anyway. For example, building netcdf-parallel (https://github.com/Parallel-NetCDF/PnetCDF) using spack (https://spack.io/). netcdf-parallel uses autotools. I haven't tried ano

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

2024-01-15 Thread Tom Eccles via cfe-commits
tblah wrote: > How would `flang-new -fno-fortran-main t.f -lFortran_main` work? Good question. This won't work with this patch but currently should work. I'll have to fix this. Do you agree that `flang-new -lFortran_main` is something we want to make work? https://github.com/llvm/llvm-project

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

2024-01-16 Thread Tom Eccles via cfe-commits
tblah wrote: > I'd agree to that! The way gfortran does it, seems the best approach. When > there's a program unit in the code, gfortran also add a `main` definition to > that translation unit. +2 > I could opt-in to make this a learning project for me, but I'd need some hand > holding to g

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

2024-01-16 Thread Tom Eccles via cfe-commits
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/78152 >From 5c7fa9c3ef911674e5b6888fcba4289834d04fda Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Mon, 15 Jan 2024 11:27:46 + Subject: [PATCH 1/4] [flang][driver] Allow explicit specification of -lFortran_main I

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

2024-01-16 Thread Tom Eccles via cfe-commits
tblah wrote: > How would `flang-new -fno-fortran-main t.f -lFortran_main` work? This works because I only remove `-lFortran_main` when it is going to be added implicitly. `-fno-fortran-main` ensures that we never reach this branch. I've added a test to verify this. https://github.com/llvm/llv

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

2024-01-22 Thread Tom Eccles via cfe-commits
tblah wrote: > My suggestion: > > * rename `Fortran_main.a` as e.g. `flang_fortran_main.a`, > > * introduce `-ffortran-main` on top of `-fno-fortran-main`, > > * disallow `-lFortran_main.a` and `-lflang_fortran_main.a` - this library > should be kept as an implementation detail of

[lldb] [flang] [clang] [llvm] [clang] Split out DebugOptions.def into its own top-level options group. (PR #75530)

2024-01-22 Thread Tom Eccles via cfe-commits
https://github.com/tblah commented: Flang changes LGTM once CI passes. https://github.com/llvm/llvm-project/pull/75530 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-01-22 Thread Tom Eccles 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

[flang] [clang] [flang][driver] deprecate manual usage of -lFortran_main (PR #79016)

2024-01-22 Thread Tom Eccles via cfe-commits
https://github.com/tblah created https://github.com/llvm/llvm-project/pull/79016 Intended to warn users of the 19.x release not to do this. A better solution should be found for the 20.x release. See discussion in https://github.com/llvm/llvm-project/pull/78152. Unfortunately there is no warni

[clang] [flang] add tbaa tags to global and direct values (PR #68727)

2023-10-24 Thread Tom Eccles via cfe-commits
tblah wrote: @Renaud-K ping https://github.com/llvm/llvm-project/pull/68727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] add tbaa tags to global and direct values (PR #68727)

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

[clang] [flang] add tbaa tags to global and direct values (PR #68727)

2023-10-25 Thread Tom Eccles via cfe-commits
tblah wrote: Merged manually in https://github.com/llvm/llvm-project/commit/6242c8ca18bcd6765094c73dd2c8b49200a6cec8 https://github.com/llvm/llvm-project/pull/68727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] 0fb763e - [flang] Add -f[no-]honor-infinities and -menable-no-infs

2022-11-03 Thread Tom Eccles via cfe-commits
Author: Tom Eccles Date: 2022-11-03T10:38:09Z New Revision: 0fb763e7d0a4b8c9f5978675e7556ae50716d695 URL: https://github.com/llvm/llvm-project/commit/0fb763e7d0a4b8c9f5978675e7556ae50716d695 DIFF: https://github.com/llvm/llvm-project/commit/0fb763e7d0a4b8c9f5978675e7556ae50716d695.diff LOG: [f

[clang] 36b37a1 - [flang] Add -f[no-]approx-func

2022-11-04 Thread Tom Eccles via cfe-commits
Author: Tom Eccles Date: 2022-11-04T17:22:34Z New Revision: 36b37a1ed561404a32a4b4b6e2bd92d915894a7c URL: https://github.com/llvm/llvm-project/commit/36b37a1ed561404a32a4b4b6e2bd92d915894a7c DIFF: https://github.com/llvm/llvm-project/commit/36b37a1ed561404a32a4b4b6e2bd92d915894a7c.diff LOG: [f

[clang] b5e93e3 - [flang] Add -f[no-]honor-nans and -menable-no-nans

2022-11-04 Thread Tom Eccles via cfe-commits
Author: Tom Eccles Date: 2022-11-04T17:22:34Z New Revision: b5e93e390c06602cb03121ad875e2855253e2937 URL: https://github.com/llvm/llvm-project/commit/b5e93e390c06602cb03121ad875e2855253e2937 DIFF: https://github.com/llvm/llvm-project/commit/b5e93e390c06602cb03121ad875e2855253e2937.diff LOG: [f

[clang] b5b8a8c - [flang] Add -f[no-]signed-zeros

2022-11-04 Thread Tom Eccles via cfe-commits
Author: Tom Eccles Date: 2022-11-04T17:22:34Z New Revision: b5b8a8cfbe1ee3c2d3684dd62e7f0ddeeeb73273 URL: https://github.com/llvm/llvm-project/commit/b5b8a8cfbe1ee3c2d3684dd62e7f0ddeeeb73273 DIFF: https://github.com/llvm/llvm-project/commit/b5b8a8cfbe1ee3c2d3684dd62e7f0ddeeeb73273.diff LOG: [f

[clang] c4dc3c0 - [flang] Add -f[no-]associative-math and -mreassociate

2022-11-04 Thread Tom Eccles via cfe-commits
Author: Tom Eccles Date: 2022-11-04T17:22:35Z New Revision: c4dc3c029416a25103d631e8dc5422f65c076376 URL: https://github.com/llvm/llvm-project/commit/c4dc3c029416a25103d631e8dc5422f65c076376 DIFF: https://github.com/llvm/llvm-project/commit/c4dc3c029416a25103d631e8dc5422f65c076376.diff LOG: [f

[clang] d0d4b63 - [flang] add -f[no-]reciprocal-math

2022-11-04 Thread Tom Eccles via cfe-commits
Author: Tom Eccles Date: 2022-11-04T17:22:35Z New Revision: d0d4b635786d510cd919cadbeb7e5e19983242cf URL: https://github.com/llvm/llvm-project/commit/d0d4b635786d510cd919cadbeb7e5e19983242cf DIFF: https://github.com/llvm/llvm-project/commit/d0d4b635786d510cd919cadbeb7e5e19983242cf.diff LOG: [f

[clang] [flang]Add vscale argument parsing (PR #67676)

2023-09-28 Thread Tom Eccles via cfe-commits
@@ -170,6 +170,39 @@ void Flang::addPicOptions(const ArgList &Args, ArgStringList &CmdArgs) const { } } + +void Flang::AddAArch64TargetArgs(const ArgList &Args, + ArgStringList &CmdArgs) const { + // Handle -msve_vector_bits= + if (Arg *A =

[clang] [flang]Add vscale argument parsing (PR #67676)

2023-09-28 Thread Tom Eccles via cfe-commits
@@ -42,6 +42,7 @@ #include "mlir/Target/LLVMIR/ModuleTranslation.h" #include "clang/Basic/Diagnostic.h" #include "clang/Basic/DiagnosticFrontend.h" +#include "clang/Basic/TargetInfo.h" tblah wrote: Is this used anywhere? https://github.com/llvm/llvm-project/p

[clang] [flang]Add vscale argument parsing (PR #67676)

2023-09-28 Thread Tom Eccles via cfe-commits
https://github.com/tblah requested changes to this pull request. Please could you add testing, like the tests you wrote for the loop versioning flag. https://github.com/llvm/llvm-project/pull/67676 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [flang]Add vscale argument parsing (PR #67676)

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

[clang] [flang]Add vscale argument parsing (PR #67676)

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

[clang] WIP: [flang] Enable fir alias tags pass by default when optimizing for speed (PR #68597)

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

[clang] WIP: [flang] Enable fir alias tags pass by default when optimizing for speed (PR #68597)

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

[clang] [flang] add tbaa tags to global variables (PR #68727)

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

[clang] [flang] Add flags controlling whether to run the fir alias tags pass (PR #68595)

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

[clang] [flang] Add flags controlling whether to run the fir alias tags pass (PR #68595)

2023-10-11 Thread Tom Eccles via cfe-commits
tblah wrote: > Does `falias-analysis` control the existing TBAA generation as well? Not in this patch while -falias-analysis is kept separate and non-default. But that will be the intention in the future. https://github.com/llvm/llvm-project/pull/68595 _

[clang] [flang] add tbaa tags to global variables (PR #68727)

2023-10-11 Thread Tom Eccles via cfe-commits
@@ -406,7 +406,7 @@ AliasAnalysis::Source AliasAnalysis::getSource(mlir::Value v) { attributes.set(Attribute::Pointer); } - if (type == SourceKind::Global) + if (type == SourceKind::Global || type == SourceKind::Direct) tblah wrote: So `SourceK

[clang] [flang] add tbaa tags to global variables (PR #68727)

2023-10-11 Thread Tom Eccles via cfe-commits
@@ -406,7 +406,7 @@ AliasAnalysis::Source AliasAnalysis::getSource(mlir::Value v) { attributes.set(Attribute::Pointer); } - if (type == SourceKind::Global) + if (type == SourceKind::Global || type == SourceKind::Direct) tblah wrote: Thank you f

[clang] [flang] add tbaa tags to global variables (PR #68727)

2023-10-11 Thread Tom Eccles via cfe-commits
@@ -406,7 +406,7 @@ AliasAnalysis::Source AliasAnalysis::getSource(mlir::Value v) { attributes.set(Attribute::Pointer); } - if (type == SourceKind::Global) + if (type == SourceKind::Global || type == SourceKind::Direct) tblah wrote: So, if I un

[clang] [flang] add tbaa tags to global variables (PR #68727)

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

[clang] [flang] add tbaa tags to global variables (PR #68727)

2023-10-11 Thread Tom Eccles via cfe-commits
@@ -406,7 +406,7 @@ AliasAnalysis::Source AliasAnalysis::getSource(mlir::Value v) { attributes.set(Attribute::Pointer); } - if (type == SourceKind::Global) + if (type == SourceKind::Global || type == SourceKind::Direct) tblah wrote: Yeah that s

[clang] ac0015f - [flang][driver] add command line arguments for alias tags pass

2023-10-12 Thread Tom Eccles via cfe-commits
Author: Tom Eccles Date: 2023-10-12T09:37:58Z New Revision: ac0015fe21110700fb5e7e9f89b377e80fc843dd URL: https://github.com/llvm/llvm-project/commit/ac0015fe21110700fb5e7e9f89b377e80fc843dd DIFF: https://github.com/llvm/llvm-project/commit/ac0015fe21110700fb5e7e9f89b377e80fc843dd.diff LOG: [f

[clang] [flang] Add flags controlling whether to run the fir alias tags pass (PR #68595)

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

[clang] [flang] Add flags controlling whether to run the fir alias tags pass (PR #68595)

2023-10-12 Thread Tom Eccles via cfe-commits
tblah wrote: Merged manually with ac0015fe21110700fb5e7e9f89b377e80fc843dd https://github.com/llvm/llvm-project/pull/68595 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] add tbaa tags to global and direct values (PR #68727)

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

[clang] 125abbd - [flang][driver] Ensure negative flags have the same visibility as positive

2023-08-29 Thread Tom Eccles via cfe-commits
Author: Tom Eccles Date: 2023-08-29T09:48:28Z New Revision: 125abbdc97671d8300cfc1ebcc010d8d4248974b URL: https://github.com/llvm/llvm-project/commit/125abbdc97671d8300cfc1ebcc010d8d4248974b DIFF: https://github.com/llvm/llvm-project/commit/125abbdc97671d8300cfc1ebcc010d8d4248974b.diff LOG: [f

[clang] acf6a32 - [flang] add -flang-experimental-hlfir flag to flang-new

2023-03-22 Thread Tom Eccles via cfe-commits
Author: Tom Eccles Date: 2023-03-22T13:36:54Z New Revision: acf6a3224955779724a35a383d63c48af2163171 URL: https://github.com/llvm/llvm-project/commit/acf6a3224955779724a35a383d63c48af2163171 DIFF: https://github.com/llvm/llvm-project/commit/acf6a3224955779724a35a383d63c48af2163171.diff LOG: [f

[clang] 39ecf9d - [flang][hlfir] Separate -emit-fir and -emit-hlfir for flang-new

2023-06-01 Thread Tom Eccles via cfe-commits
Author: Tom Eccles Date: 2023-06-01T19:29:16Z New Revision: 39ecf9d8a1533a434bb9544a1bc275c4d02e2efb URL: https://github.com/llvm/llvm-project/commit/39ecf9d8a1533a434bb9544a1bc275c4d02e2efb DIFF: https://github.com/llvm/llvm-project/commit/39ecf9d8a1533a434bb9544a1bc275c4d02e2efb.diff LOG: [f

[clang] cc14bf2 - [flang] add a pass to move array temporaries to the stack

2023-02-07 Thread Tom Eccles via cfe-commits
Author: Tom Eccles Date: 2023-02-07T10:27:52Z New Revision: cc14bf22bddf7abb1f13099c2d6ace5cdb8b7a5f URL: https://github.com/llvm/llvm-project/commit/cc14bf22bddf7abb1f13099c2d6ace5cdb8b7a5f DIFF: https://github.com/llvm/llvm-project/commit/cc14bf22bddf7abb1f13099c2d6ace5cdb8b7a5f.diff LOG: [f

[clang] bf81ba3 - [flang] add -fstack-arrays flag

2023-02-07 Thread Tom Eccles via cfe-commits
Author: Tom Eccles Date: 2023-02-07T10:27:52Z New Revision: bf81ba37262880a8391f63c1747d61e4851344c4 URL: https://github.com/llvm/llvm-project/commit/bf81ba37262880a8391f63c1747d61e4851344c4 DIFF: https://github.com/llvm/llvm-project/commit/bf81ba37262880a8391f63c1747d61e4851344c4.diff LOG: [f

[clang] e7b6660 - [flang] Add -ffast-math and -Ofast

2022-12-09 Thread Tom Eccles via cfe-commits
Author: Tom Eccles Date: 2022-12-09T19:55:58Z New Revision: e7b6660243d1a4548f7aaac992b777ef0f0ba5b7 URL: https://github.com/llvm/llvm-project/commit/e7b6660243d1a4548f7aaac992b777ef0f0ba5b7 DIFF: https://github.com/llvm/llvm-project/commit/e7b6660243d1a4548f7aaac992b777ef0f0ba5b7.diff LOG: [f

[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] 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] 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][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] 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] 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] [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
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
@@ -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
@@ -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
@@ -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
@@ -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
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] 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] 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 -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-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-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] allow -fopenmp= (PR #86816)

2024-04-05 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. Thanks! LGTM https://github.com/llvm/llvm-project/pull/86816 ___ 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-04-10 Thread Tom Eccles via cfe-commits
https://github.com/tblah closed https://github.com/llvm/llvm-project/pull/78152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [Flang] Add options frtlib-add-rpath and resource-dir (PR #88280)

2024-04-11 Thread Tom Eccles via cfe-commits
@@ -0,0 +1,32 @@ +// REQUIRES: x86-registered-target tblah wrote: Please could you use fortran style comments (starting with `!`) https://github.com/llvm/llvm-project/pull/88280 ___ cfe-commits mailing list cfe-commits

[clang] [flang] [Flang] Add options frtlib-add-rpath and resource-dir (PR #88280)

2024-04-11 Thread Tom Eccles via cfe-commits
https://github.com/tblah commented: Thanks for the fix. Other changes look good to me, but please wait for approval from @jhuber6 https://github.com/llvm/llvm-project/pull/88280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [flang] [llvm] [mlir] [Flang]Fix for changed code at the end of AllocaIP. (PR #92430)

2024-06-06 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. LGTM if @Meinersbur is happy. It's a shame about the fallout to the clang tests but I can see that would be very difficult to avoid. Thank you for persisting with this difficult patch. https://github.com/llvm/llvm-project/pull/92430

[clang] [flang] [llvm] [mlir] [Flang]Fix for changed code at the end of AllocaIP. (PR #92430)

2024-06-07 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. https://github.com/llvm/llvm-project/pull/92430 ___ 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-06-14 Thread Tom Eccles via cfe-commits
@@ -39,6 +39,7 @@ ENUM_CODEGENOPT(RelocationModel, llvm::Reloc::Model, 3, llvm::Reloc::PIC_) ///< ENUM_CODEGENOPT(DebugInfo, llvm::codegenoptions::DebugInfoKind, 4, llvm::codegenoptions::NoDebugInfo) ///< Level of debug info to generate ENUM_CODEGENOPT(VecLib, llvm::driver::

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

2024-06-14 Thread Tom Eccles via cfe-commits
@@ -39,6 +39,7 @@ ENUM_CODEGENOPT(RelocationModel, llvm::Reloc::Model, 3, llvm::Reloc::PIC_) ///< ENUM_CODEGENOPT(DebugInfo, llvm::codegenoptions::DebugInfoKind, 4, llvm::codegenoptions::NoDebugInfo) ///< Level of debug info to generate ENUM_CODEGENOPT(VecLib, llvm::driver::

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

2024-06-14 Thread Tom Eccles via cfe-commits
@@ -39,6 +39,7 @@ ENUM_CODEGENOPT(RelocationModel, llvm::Reloc::Model, 3, llvm::Reloc::PIC_) ///< ENUM_CODEGENOPT(DebugInfo, llvm::codegenoptions::DebugInfoKind, 4, llvm::codegenoptions::NoDebugInfo) ///< Level of debug info to generate ENUM_CODEGENOPT(VecLib, llvm::driver::

[clang] [flang] [flang][driver] Avoid mentions of Clang in Flang's command line reference. (PR #88932)

2024-04-17 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. The changes in this PR look good to me. Thanks for the fix! https://github.com/llvm/llvm-project/pull/88932 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [flang] [flang] Default -g to full debug info. (PR #89418)

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

[clang] [flang] [flang] Default -g to full debug info. (PR #89418)

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

[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] [lld] [flang] Generate main only when a Fortran program statement is present (PR #89938)

2024-04-25 Thread Tom Eccles via cfe-commits
@@ -6582,12 +6582,6 @@ def J : JoinedOrSeparate<["-"], "J">, Group, Alias; -let Visibility = [FlangOption] in { -def no_fortran_main : Flag<["-"], "fno-fortran-main">, tblah wrote: Will this break existing build systems configured to use this flag? https

[clang] [flang] [lld] [flang] Generate main only when a Fortran program statement is present (PR #89938)

2024-04-25 Thread Tom Eccles via cfe-commits
https://github.com/tblah commented: Thanks for this. I'm sure it will give a big improvement to the experience of building applications with flang. Code changes look good to me. I'm worried about how this could break existing builds using `-fno-fortran-main` and `-lFortran_main`. Do you have a

[clang] [flang] [lld] [flang] Generate main only when a Fortran program statement is present (PR #89938)

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

[clang] [flang] [lld] [flang] Generate main only when a Fortran program statement is present (PR #89938)

2024-04-25 Thread Tom Eccles via cfe-commits
@@ -1191,118 +1191,10 @@ bool tools::addOpenMPRuntime(const Compilation &C, ArgStringList &CmdArgs, return true; } -/// Determines if --whole-archive is active in the list of arguments. -static bool isWholeArchivePresent(const ArgList &Args) { - bool WholeArchiveActive = f

[clang] [flang] [lld] [flang] Generate main only when a Fortran program statement is present (PR #89938)

2024-04-26 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. https://github.com/llvm/llvm-project/pull/89938 ___ 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 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] 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
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/3] [flang][Driver] support -fno-openmp Closes #83148 --- clang/incl

[clang] [clang-tools-extra] [flang] [llvm] [mlir] [polly] [test]: fix filecheck annotation typos (PR #91854)

2024-05-13 Thread Tom Eccles via cfe-commits
https://github.com/tblah commented: Thank you for the cleanup! Two of the flang tests don't pass. Please could you remove all of the changed CHECK lines in `flang/Lower/array.f90` and `flang/Lower/module_use.f90`. `array.f90` seems to have always been broken: `CHECK-LABEL` is enforcing an unr

[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-05-13 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. Apologies for losing track of this, I was on holiday all of last week. This LGTM https://github.com/llvm/llvm-project/pull/90886 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [flang] [flang] Add nsw flag to do-variable increment with a new option (PR #91579)

2024-05-14 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. Looks great to me. Thanks for all of your work on this! https://github.com/llvm/llvm-project/pull/91579 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

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

2024-06-26 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

[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

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

<    1   2   3   4   >