[clang] [Clang][OpenMP] Add an additional class to hold data that will be shared between all loop transformations (PR #155849)

2025-08-29 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur commented: Consider https://llvm.org/docs/GitHub.html#stacked-pull-requests https://github.com/llvm/llvm-project/pull/155849 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [Clang][NFC] Rename OMPLoopTransformationDirective to OMPCanonicalLoopNestTransformationDirective (PR #155848)

2025-08-29 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/155848 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][OpenMP] Add an additional class to hold data that will be shared between all loop transformations (PR #155849)

2025-08-29 Thread Michael Kruse via cfe-commits
@@ -956,30 +956,42 @@ class OMPLoopBasedDirective : public OMPExecutableDirective { } }; +/// Common class of data shared between +/// OMPCanonicalLoopNestTransformationDirective and transformations over +/// canonical loop sequences. +class OMPLoopTransformationDirective {

[clang] [Clang][OpenMP] Add an additional class to hold data that will be shared between all loop transformations (PR #155849)

2025-08-29 Thread Michael Kruse via cfe-commits
@@ -956,30 +956,42 @@ class OMPLoopBasedDirective : public OMPExecutableDirective { } }; +/// Common class of data shared between +/// OMPCanonicalLoopNestTransformationDirective and transformations over +/// canonical loop sequences. Meinersbur wrote: Wou

[clang] [Clang][OpenMP] Add an additional class to hold data that will be shared between all loop transformations (PR #155849)

2025-08-29 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/155849 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMPIRBuilder] Fix tripcount not a multiple of tile size (PR #154999)

2025-08-25 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur ready_for_review https://github.com/llvm/llvm-project/pull/154999 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMPIRBuilder] Fix tripcount not a multiple of tile size (PR #154999)

2025-08-22 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur created https://github.com/llvm/llvm-project/pull/154999 The emitted code tests whether the current tile should executing the remainder iterations by checking the logical iteration number is the one after the floor iterations that execute the non-remainder iterati

[clang] [flang] [flang] add -floop-interchange and enable it with opt levels (PR #140182)

2025-08-21 Thread Michael Kruse via cfe-commits
Meinersbur wrote: > > There are fundamental flaws in DA's implementation, particularly in how it > > handles wrapping of SCEVs. > > Tell me more about it in a separate bug, and let's see how we can work > towards fixing it. If you look over the code you can see that no attention was paid to i

[clang] [flang] [flang] add -floop-interchange and enable it with opt levels (PR #140182)

2025-08-20 Thread Michael Kruse via cfe-commits
Meinersbur wrote: Flang's policy is not really different from Clang's, but I can raise it in the next community call https://github.com/llvm/llvm-project/pull/140182 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-07 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur milestoned https://github.com/llvm/llvm-project/pull/151954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-07 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/151954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-07 Thread Michael Kruse via cfe-commits
Meinersbur wrote: /cherry-pick 8de481913353a1e37264687d5cc73db0de19e6cc https://github.com/llvm/llvm-project/pull/151954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-06 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/151954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-06 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/151954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-06 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/151954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-06 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur closed https://github.com/llvm/llvm-project/pull/151954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-06 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/151954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-06 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/151954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-06 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/151954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)

2025-08-06 Thread Michael Kruse via cfe-commits
@@ -14236,28 +14279,282 @@ bool SemaOpenMP::checkTransformableLoopNest( return false; }, [&OriginalInits](OMPLoopBasedDirective *Transform) { -Stmt *DependentPreInits; -if (auto *Dir = dyn_cast(Transform)) - DependentPreInits = Dir->

[clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)

2025-08-06 Thread Michael Kruse via cfe-commits
@@ -14206,10 +14211,48 @@ StmtResult SemaOpenMP::ActOnOpenMPTargetTeamsDistributeSimdDirective( getASTContext(), StartLoc, EndLoc, NestedLoopCount, Clauses, AStmt, B); } +/// Overloaded base case function +template static bool tryHandleAs(T *, F &&) { + return false;

[clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)

2025-08-06 Thread Michael Kruse via cfe-commits
@@ -15516,6 +15811,490 @@ StmtResult SemaOpenMP::ActOnOpenMPInterchangeDirective( buildPreInits(Context, PreInits)); } +StmtResult SemaOpenMP::ActOnOpenMPFuseDirective(ArrayRef Clauses, +

[clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)

2025-08-06 Thread Michael Kruse via cfe-commits
@@ -0,0 +1,400 @@ +// Check no warnings/errors +// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fopenmp -std=c++20 -fopenmp-version=60 -fsyntax-only -verify %s +// expected-no-diagnostics + +// Check AST and unparsing +// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fopenmp -std

[clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)

2025-08-06 Thread Michael Kruse via cfe-commits
@@ -14236,28 +14279,282 @@ bool SemaOpenMP::checkTransformableLoopNest( return false; }, [&OriginalInits](OMPLoopBasedDirective *Transform) { -Stmt *DependentPreInits; -if (auto *Dir = dyn_cast(Transform)) - DependentPreInits = Dir->

[clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)

2025-08-06 Thread Michael Kruse via cfe-commits
@@ -5914,6 +5935,91 @@ class OMPInterchangeDirective final : public OMPLoopTransformationDirective { } }; +/// Represents the '#pragma omp fuse' loop transformation directive +/// +/// \code{c} +/// #pragma omp fuse +/// { +/// for(int i = 0; i < m1; ++i) {...} +/// for

[clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)

2025-08-06 Thread Michael Kruse via cfe-commits
@@ -14236,28 +14279,282 @@ bool SemaOpenMP::checkTransformableLoopNest( return false; }, [&OriginalInits](OMPLoopBasedDirective *Transform) { -Stmt *DependentPreInits; -if (auto *Dir = dyn_cast(Transform)) - DependentPreInits = Dir->

[clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)

2025-08-06 Thread Michael Kruse via cfe-commits
@@ -5863,7 +5881,10 @@ class OMPInterchangeDirective final : public OMPLoopTransformationDirective { : OMPLoopTransformationDirective(OMPInterchangeDirectiveClass, llvm::omp::OMPD_interchange, StartLoc,

[clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)

2025-08-06 Thread Michael Kruse via cfe-commits
@@ -14236,28 +14279,282 @@ bool SemaOpenMP::checkTransformableLoopNest( return false; }, [&OriginalInits](OMPLoopBasedDirective *Transform) { -Stmt *DependentPreInits; -if (auto *Dir = dyn_cast(Transform)) - DependentPreInits = Dir->

[clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)

2025-08-06 Thread Michael Kruse via cfe-commits
@@ -508,6 +512,43 @@ OMPInterchangeDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses, SourceLocation(), SourceLocation(), NumLoops); } +OMPFuseDirective *OMPFuseDirective::Create( +const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, +

[clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)

2025-08-06 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur deleted https://github.com/llvm/llvm-project/pull/139293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-08-06 Thread Michael Kruse via cfe-commits
Meinersbur wrote: Should we choose a different module path than `finclude` to avoid accidental confusion between flang and gfortran modules files, e.g. `fmod`? https://github.com/llvm/llvm-project/pull/137828 ___ cfe-commits mailing list cfe-commits@l

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-06 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/151954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-06 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/151954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-06 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/151954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-06 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/151954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-06 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/151954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-06 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur ready_for_review https://github.com/llvm/llvm-project/pull/151954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-06 Thread Michael Kruse via cfe-commits
Meinersbur wrote: @PHHargrove Thanks for the details. There is something weird about your setup. 1. `libflang_rt.runtime.a` in `arm64-apple-darwin23.6.0/`. As long as CMake detects [`APPLE`](https://cmake.org/cmake/help/latest/variable/APPLE.html), the install directory will be [`CMAKE_SYSTEM_

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-06 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur updated https://github.com/llvm/llvm-project/pull/151954 >From ea175cbbecc3f89319846fd20daa53711bd1969e Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Mon, 4 Aug 2025 14:36:01 +0200 Subject: [PATCH 1/4] Do not use apple-specific scheme --- flang-rt/cmake/modu

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-06 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/151954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [openmp] [OpenMP] Remove LLVM_ENABLE_PROJECTS=openmp build mode (PR #152189)

2025-08-06 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur updated https://github.com/llvm/llvm-project/pull/152189 >From d72ecacb4338043bb3689af86d10b2981d07f988 Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Tue, 5 Aug 2025 20:42:04 +0200 Subject: [PATCH 1/2] [openmp] Remove LLVM_ENABLE_PROJECTS=openmp build mode --

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-05 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/151954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-05 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/151954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-05 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/151954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-05 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/151954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-05 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/151954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-05 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/151954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-05 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/151954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-05 Thread Michael Kruse via cfe-commits
Meinersbur wrote: For reference. compiler-rt special Apple code: https://github.com/llvm/llvm-project/blob/9b2b5bf8cd751fabccaca1b8847b4c291aa52081/compiler-rt/cmake/Modules/CompilerRTUtils.cmake#L518 flang-rt special Apple code: https://github.com/llvm/llvm-project/blob/9b2b5bf8cd751fabccaca1b

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-05 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/151954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-05 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/151954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Flang-RT] Do not use Apple-specific libdir scheme (PR #151954)

2025-08-05 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur updated https://github.com/llvm/llvm-project/pull/151954 >From ea175cbbecc3f89319846fd20daa53711bd1969e Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Mon, 4 Aug 2025 14:36:01 +0200 Subject: [PATCH 1/3] Do not use apple-specific scheme --- flang-rt/cmake/modu

[clang] [llvm] [Flang-RT] Do not use Apple-specific libdir scheme (PR #151954)

2025-08-05 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur updated https://github.com/llvm/llvm-project/pull/151954 >From ea175cbbecc3f89319846fd20daa53711bd1969e Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Mon, 4 Aug 2025 14:36:01 +0200 Subject: [PATCH 1/2] Do not use apple-specific scheme --- flang-rt/cmake/modu

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-08-04 Thread Michael Kruse via cfe-commits
Meinersbur wrote: ping https://github.com/llvm/llvm-project/pull/137828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)

2025-07-30 Thread Michael Kruse via cfe-commits
Meinersbur wrote: > I understand this is predicated to the availability of the transformation in > `Sema`, but this may not happen if we defer the transformation to > `OpenMPIRBuilder` in `CodeGen`. For these cases I presume we cannot emit > reliable diagnostics for the validity of the canonic

[clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)

2025-07-28 Thread Michael Kruse via cfe-commits
Meinersbur wrote: > Maybe there is no need to recursively represent all the nested transformation? I don't see a need to represent the entire loop structure. The only info that I think is potentially needed is the nest depth for transformations that generate a loop nest (e.g. tile), and for tr

[clang] [Clang] Rework creating offloading toolchains (PR #125556)

2025-07-28 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/125556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Rework creating offloading toolchains (PR #125556)

2025-07-28 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/125556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Rework creating offloading toolchains (PR #125556)

2025-07-28 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/125556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Rework creating offloading toolchains (PR #125556)

2025-07-28 Thread Michael Kruse via cfe-commits
@@ -950,221 +930,264 @@ static bool addSYCLDefaultTriple(Compilation &C, return true; } -void Driver::CreateOffloadingDeviceToolChains(Compilation &C, - InputList &Inputs) { - - // - // CUDA/HIP - // - // We need to generate a

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-07-22 Thread Michael Kruse via cfe-commits
@@ -6,8 +6,8 @@ !- ! FRONTEND FLANG DRIVER (flang -fc1) !- -! RUN: %flang_fc1 -fsyntax-only %s 2>&1 | FileCheck %s --allow-empty --check-prefix=WITHOUT -! RUN: not %flang_fc1 -fsyntax-only -fintri

[clang] [Clang] Rework creating offloading toolchains (PR #125556)

2025-07-22 Thread Michael Kruse via cfe-commits
Meinersbur wrote: Failures of the sinitizer builds look related to this (https://lab.llvm.org/buildbot/#/builders/169/builds/13161): ``` 0. Program arguments: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/clang -emit-llvm --cuda-device-only --offload=spirv32 -nocudal

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-07-21 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/137828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-07-21 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/137828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-07-21 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/137828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-07-21 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/137828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-07-21 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/137828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-07-21 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/137828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-07-21 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/137828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-07-21 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/137828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-07-21 Thread Michael Kruse via cfe-commits
@@ -6,8 +6,8 @@ !- ! FRONTEND FLANG DRIVER (flang -fc1) !- -! RUN: %flang_fc1 -fsyntax-only %s 2>&1 | FileCheck %s --allow-empty --check-prefix=WITHOUT -! RUN: not %flang_fc1 -fsyntax-only -fintri

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-07-21 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur updated https://github.com/llvm/llvm-project/pull/137828 >From 839198d61f9937b5504d5e036c67266b4b84da8e Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Thu, 17 Jul 2025 14:09:57 +0200 Subject: [PATCH 01/12] [Flang][Flang-RT][OpenMP] Move builtin .mod generation

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-07-21 Thread Michael Kruse via cfe-commits
@@ -6,8 +6,8 @@ !- ! FRONTEND FLANG DRIVER (flang -fc1) !- -! RUN: %flang_fc1 -fsyntax-only %s 2>&1 | FileCheck %s --allow-empty --check-prefix=WITHOUT -! RUN: not %flang_fc1 -fsyntax-only -fintri

[clang] [flang] [Flang] Add -fintrinsic-modules-path= alias (PR #149417)

2025-07-21 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur closed https://github.com/llvm/llvm-project/pull/149417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [Flang] Add -fintrinsic-modules-path= alias (PR #149417)

2025-07-21 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/149417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-07-19 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur ready_for_review https://github.com/llvm/llvm-project/pull/137828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-07-19 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/137828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-07-19 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur updated https://github.com/llvm/llvm-project/pull/137828 >From 839198d61f9937b5504d5e036c67266b4b84da8e Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Thu, 17 Jul 2025 14:09:57 +0200 Subject: [PATCH 01/11] [Flang][Flang-RT][OpenMP] Move builtin .mod generation

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-07-18 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur updated https://github.com/llvm/llvm-project/pull/137828 >From 839198d61f9937b5504d5e036c67266b4b84da8e Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Thu, 17 Jul 2025 14:09:57 +0200 Subject: [PATCH 1/9] [Flang][Flang-RT][OpenMP] Move builtin .mod generation i

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-07-18 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur updated https://github.com/llvm/llvm-project/pull/137828 >From 839198d61f9937b5504d5e036c67266b4b84da8e Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Thu, 17 Jul 2025 14:09:57 +0200 Subject: [PATCH 1/8] [Flang][Flang-RT][OpenMP] Move builtin .mod generation i

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-07-18 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur updated https://github.com/llvm/llvm-project/pull/137828 >From 839198d61f9937b5504d5e036c67266b4b84da8e Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Thu, 17 Jul 2025 14:09:57 +0200 Subject: [PATCH 1/7] [Flang][Flang-RT][OpenMP] Move builtin .mod generation i

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-07-17 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur updated https://github.com/llvm/llvm-project/pull/137828 >From 839198d61f9937b5504d5e036c67266b4b84da8e Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Thu, 17 Jul 2025 14:09:57 +0200 Subject: [PATCH 1/6] [Flang][Flang-RT][OpenMP] Move builtin .mod generation i

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-07-17 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur updated https://github.com/llvm/llvm-project/pull/137828 >From 839198d61f9937b5504d5e036c67266b4b84da8e Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Thu, 17 Jul 2025 14:09:57 +0200 Subject: [PATCH 1/5] [Flang][Flang-RT][OpenMP] Move builtin .mod generation i

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-07-17 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur updated https://github.com/llvm/llvm-project/pull/137828 >From 839198d61f9937b5504d5e036c67266b4b84da8e Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Thu, 17 Jul 2025 14:09:57 +0200 Subject: [PATCH 1/4] [Flang][Flang-RT][OpenMP] Move builtin .mod generation i

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-07-17 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/137828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-07-17 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/137828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-07-17 Thread Michael Kruse via cfe-commits
@@ -3979,6 +3979,16 @@ def fsyntax_only : Flag<["-"], "fsyntax-only">, Visibility<[ClangOption, CLOption, DXCOption, CC1Option, FC1Option, FlangOption]>, Group, HelpText<"Run the preprocessor, parser and semantic analysis stages">; + + +def fno_builtin_modules : Flag<["-

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-07-17 Thread Michael Kruse via cfe-commits
Meinersbur wrote: > What's the main limitation here? If this is just a file dependency it should > be identical to how all the OpenMP tests depend on `omp.h` being in the > resource directory. `omp.h` is created by `configure_file` at configure time. No dependency other than `runtimes-configu

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-07-17 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur updated https://github.com/llvm/llvm-project/pull/137828 >From 839198d61f9937b5504d5e036c67266b4b84da8e Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Thu, 17 Jul 2025 14:09:57 +0200 Subject: [PATCH 1/2] [Flang][Flang-RT][OpenMP] Move builtin .mod generation i

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-07-17 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur updated https://github.com/llvm/llvm-project/pull/137828 >From 839198d61f9937b5504d5e036c67266b4b84da8e Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Thu, 17 Jul 2025 14:09:57 +0200 Subject: [PATCH] [Flang][Flang-RT][OpenMP] Move builtin .mod generation into

[clang] [clang][CodeGen] Fix metadata when vectorization is disabled by pragma (PR #135163)

2025-07-16 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur approved this pull request. LGTM, thank you https://github.com/llvm/llvm-project/pull/135163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Fix metadata when vectorization is disabled by pragma (PR #135163)

2025-07-14 Thread Michael Kruse via cfe-commits
@@ -643,9 +650,7 @@ void LoopInfoStack::push(BasicBlock *Header, clang::ASTContext &Ctx, case LoopHintAttr::Disable: switch (Option) { case LoopHintAttr::Vectorize: -// Disable vectorization by specifying a width of 1. -setVectorizeWidth(1); -

[clang] [clang][CodeGen] Fix metadata when vectorization is disabled by pragma (PR #135163)

2025-07-14 Thread Michael Kruse via cfe-commits
@@ -5237,8 +5237,8 @@ width/count of the set of target architectures supported by your application. ... } -Specifying a width/count of 1 disables the optimization, and is equivalent to -``vectorize(disable)`` or ``interleave(disable)``. Meinersbur wrote

[clang] [clang][CodeGen] Fix metadata when vectorization is disabled by pragma (PR #135163)

2025-07-14 Thread Michael Kruse via cfe-commits
Meinersbur wrote: > I think there are two possible interpretations of `vectorize(disable) > vectorize_width(scalable)`, as follows: > > * It is equivalent to `vectorize(disable)` so vectorization is disabled, as > the document says: > > Pragmas setting transformation options imply the transf

[clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)

2025-06-20 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/139293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)

2025-06-20 Thread Michael Kruse via cfe-commits
@@ -14219,27 +14265,320 @@ bool SemaOpenMP::checkTransformableLoopNest( return false; }, [&OriginalInits](OMPLoopBasedDirective *Transform) { -Stmt *DependentPreInits; -if (auto *Dir = dyn_cast(Transform)) - DependentPreInits = Dir->

[clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)

2025-06-20 Thread Michael Kruse via cfe-commits
@@ -3256,9 +3256,8 @@ LValue CodeGenFunction::EmitDeclRefLValue(const DeclRefExpr *E) { var, ConvertTypeForMem(VD->getType()), getContext().getDeclAlign(VD)); // No other cases for now. -} else { +} else llvm_unreachable("DeclRefExpr for Decl not

[clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)

2025-06-20 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur commented: Thanks for the work and sorry I could not have a look into it earlier https://github.com/llvm/llvm-project/pull/139293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)

2025-06-20 Thread Michael Kruse via cfe-commits
@@ -15499,6 +15836,496 @@ StmtResult SemaOpenMP::ActOnOpenMPInterchangeDirective( buildPreInits(Context, PreInits)); } +StmtResult SemaOpenMP::ActOnOpenMPFuseDirective(ArrayRef Clauses, +

[clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)

2025-06-20 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/139293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   >