[clang] [flang] [lld] [Flang] Don't use FortranDecimal for runtime (PR #121997)

2025-01-12 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur updated https://github.com/llvm/llvm-project/pull/121997 >From a08aa48fb4955f9d16c6172580505c100076b5d4 Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Tue, 7 Jan 2025 17:05:39 +0100 Subject: [PATCH 1/4] Join FortranDecimal into FortranCommon --- clang/lib/Dri

[clang] [flang] [lld] [Flang] Don't use FortranDecimal for runtime (PR #121997)

2025-01-10 Thread Michael Kruse via cfe-commits
Meinersbur wrote: Thanks for the review. I will wait for the other PRs to progress before pushing. https://github.com/llvm/llvm-project/pull/121997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [flang] [lld] [Flang] Don't use FortranDecimal for runtime (PR #121997)

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

[clang] [flang] [lld] [Flang] Don't use FortranDecimal for runtime (PR #121997)

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

[clang] [flang] [lld] [Flang] Don't use FortranDecimal for runtime (PR #121997)

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

[clang] [flang] [lld] [Flang] Don't use FortranDecimal for runtime (PR #121997)

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

[clang] [flang] [lld] [Flang] Don't use FortranDecimal for runtime (PR #121997)

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

[clang] [flang] [lld] [Flang] Remove FortranDecimal library (PR #121997)

2025-01-08 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur updated https://github.com/llvm/llvm-project/pull/121997 >From a08aa48fb4955f9d16c6172580505c100076b5d4 Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Tue, 7 Jan 2025 17:05:39 +0100 Subject: [PATCH 1/3] Join FortranDecimal into FortranCommon --- clang/lib/Dri

[clang] [flang] [lld] [Flang] Remove FortranDecimal library (PR #121997)

2025-01-08 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur updated https://github.com/llvm/llvm-project/pull/121997 >From a08aa48fb4955f9d16c6172580505c100076b5d4 Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Tue, 7 Jan 2025 17:05:39 +0100 Subject: [PATCH 1/2] Join FortranDecimal into FortranCommon --- clang/lib/Dri

[clang] [flang] [lld] [Flang] Remove FortranDecimal library (PR #121997)

2025-01-07 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur created https://github.com/llvm/llvm-project/pull/121997 Dissolve the library `FortranDecimal` which consists of only two source files. It was used in two ways: 1. As an auxiliary library needed for `libFortranRuntime.a`. This patch adds the two source files of F

[clang] [llvm] [OpenMP][OMPIRBuilder] Handle non-failing calls properly (PR #115863)

2025-01-07 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur approved this pull request. The compromise with `cantFail` is fine. Most will run those tests with assertions enabled and undefined behaviour is one of the things a unittests should be regularly tested for (e.g. with undefined-behaviour sanitizer). https://github.

[libclc] [llvm] [polly] [llvm] Move sub-project lead maintainers into their own Maintainers.md files (PR #118309)

2024-12-09 Thread Michael Kruse via cfe-commits
Meinersbur wrote: @tobiasgrosser and me already had talked about this at an LLVM conference. I didn't push the maintainer change yet because I am myself somewhat slow with reviews, but I think it makes sense. https://github.com/llvm/llvm-project/pull/118309

[clang] [llvm] [OpenMP][OMPIRBuilder] Handle non-failing calls properly (PR #115863)

2024-11-13 Thread Michael Kruse via cfe-commits
@@ -345,18 +344,15 @@ TEST_F(OpenMPIRBuilderTest, CreateBarrier) { IRBuilder<> Builder(BB); - OpenMPIRBuilder::InsertPointOrErrorTy BarrierIP1 = - OMPBuilder.createBarrier({IRBuilder<>::InsertPoint()}, OMPD_for); - assert(BarrierIP1 && "unexpected error"); + ASSERT_

[clang] [llvm] [OpenMP][OMPIRBuilder] Handle non-failing calls properly (PR #115863)

2024-11-13 Thread Michael Kruse via cfe-commits
@@ -235,10 +235,9 @@ class OpenMPIRBuilderTest : public testing::Test { return Error::success(); }; -Expected LoopResult = -OMPBuilder.createCanonicalLoop(Loc, LoopBodyGenCB, CastedTripCount); -assert(LoopResult && "unexpected error"); -CanonicalL

[clang] [llvm] [OpenMP][OMPIRBuilder] Handle non-failing calls properly (PR #115863)

2024-11-12 Thread Michael Kruse via cfe-commits
Meinersbur wrote: `cantFail` is not guaranteed to crash, e.g. in `-DLLVM_ENABLE_ASSERTIONS=OFF -DLLVM_UNREACHABLE_OPTIMIZE=ON`. I think this is fine for implementation code, for which `LLVM_UNREACHABLE_OPTIMIZE` is meant to improve performance, but for unittests such tests could silently pass

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

2024-11-11 Thread Michael Kruse via cfe-commits
@@ -2331,8 +2332,11 @@ void CGOpenMPRuntime::emitBarrierCall(CodeGenFunction &CGF, SourceLocation Loc, auto *OMPRegionInfo = dyn_cast_or_null(CGF.CapturedStmtInfo); if (CGF.CGM.getLangOpts().OpenMPIRBuilder) { -CGF.Builder.restoreIP(OMPBuilder.createBarrier( -

[clang] [flang] [flang][Driver] When linking with the Fortran runtime, the `addArchSpecificRPath()` should be called too (PR #114837)

2024-11-05 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/114837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] When linking with the Fortran runtime, the `addArchSpecificRPath()` should be called too (PR #114837)

2024-11-05 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur commented: `addSanitizerRuntime` and `addOpenMPRuntime` are already calling `addArchSpecificRPath`. It it a problem if rpath is added multiple times? Compiler-rt libs (`libclang_rt.*.a`) are added as absolute paths, shouldn't the Fortran-runtime do the same? http

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

2024-10-17 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur requested changes to this pull request. Marking this PR as no consensus reached https://github.com/llvm/llvm-project/pull/110598 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

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

2024-10-17 Thread Michael Kruse via cfe-commits
Meinersbur wrote: > I don’t personally think that the flang driver should ever attempt to link a > C++ library of any kind. FWIW while there’s no stdlib option to consider in > their case, g++ will never auto link the gfortran runtimes and gfortran will > never auto link libstdc++ gfortran do

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

2024-10-16 Thread Michael Kruse via cfe-commits
Meinersbur wrote: @DavidTruby So CMake adds `-lFortranRuntime -lFortranDecimal` itself? I did not expect that, usually the flang-new driver would be responsible for that. I found how CMake does it: https://github.com/Kitware/CMake/blob/ee2eadb252708b2401da99b8ccc69d6501c7143f/Modules/CMakeDet

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

2024-10-16 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur approved this pull request. LGTM 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] [llvm] [openmp] [Clang][OpenMP] Add permutation clause (PR #92030)

2024-10-09 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur closed https://github.com/llvm/llvm-project/pull/92030 ___ 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] Add permutation clause (PR #92030)

2024-10-08 Thread Michael Kruse via cfe-commits
@@ -16029,6 +16074,44 @@ OMPClause *SemaOpenMP::ActOnOpenMPSizesClause(ArrayRef SizeExprs, SanitizedSizeExprs); } +OMPClause *SemaOpenMP::ActOnOpenMPPermutationClause(ArrayRef PermExprs, +Sour

[clang] [flang] [llvm] [openmp] [Clang][OpenMP] Add permutation clause (PR #92030)

2024-10-04 Thread Michael Kruse via cfe-commits
Meinersbur wrote: @alexey-bataev Could you have another look? https://github.com/llvm/llvm-project/pull/92030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-10-04 Thread Michael Kruse via cfe-commits
Meinersbur wrote: >From the summary? > This has created a nowhere to go situation, the only remaining option is to > make the -stdlib flag visible to flang and silently ignored. Can you clarify? I think it is not ignored, otherwise the test would fail since it requires linking to the `` imple

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

2024-10-03 Thread Michael Kruse via cfe-commits
Meinersbur wrote: While the FortranRuntime is written in C++, it is ensured that it does not depend on libc++.so/libstdc++.so ([regression test](https://github.com/llvm/llvm-project/blob/main/flang/test/Runtime/no-cpp-dep.c)). Hence what C++ runtime the user links into their executable shouldn

[clang] [llvm] [OpenMP] Diagnostic check for imperfect loop collapse (PR #96087)

2024-08-21 Thread Michael Kruse via cfe-commits
Meinersbur wrote: I agree with @kparzysz that the examples you are using are generally unsafe. E.g. with ```c #pragma omp parallel for collapse(2) for (int i = 0; i < N; i++) { arr[i][i] = ...; for (int j = 0; j < N; j++) { arr[i][j] = ...; } } ``` there shoul

[clang] [llvm] Add emitAtomicCompareExchangeBuiltin helper function (PR #101966)

2024-08-12 Thread Michael Kruse via cfe-commits
Meinersbur wrote: `TargetLibraryInfoImpl` is not contained in the backends, but implemented entirely in [`TargetLibraryInfo.cpp`](https://github.com/llvm/llvm-project/blob/main/llvm/lib/Analysis/TargetLibraryInfo.cpp). `TargetLowering` is implemented in the backend, but is also optional. If

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

2024-07-24 Thread Michael Kruse via cfe-commits
Meinersbur wrote: I reproduced this locally. The output is: ``` $ /home/meinersbur/build/llvm-project/release/bin/flang-new -S -### /c/Users/meinersbur/src/llvm-project/flang/test/Driver/omp-driver-offload-amdgpu.f90 -o /home/meinersbur/build/llvm-project/release/tools/flang/test/Driver/Output

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

2024-07-24 Thread Michael Kruse via cfe-commits
@@ -492,6 +493,18 @@ void Flang::addOffloadOptions(Compilation &C, const InputInfoList &Inputs, if (Args.hasArg(options::OPT_nogpulib)) CmdArgs.push_back("-nogpulib"); } + + // For all the host OpenMP offloading compile jobs we need to pass the targets + // info

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

2024-07-24 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur approved this pull request. Some nits, but otherwise LGTM. https://github.com/llvm/llvm-project/pull/100152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

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

2024-07-24 Thread Michael Kruse via cfe-commits
@@ -492,6 +493,18 @@ void Flang::addOffloadOptions(Compilation &C, const InputInfoList &Inputs, if (Args.hasArg(options::OPT_nogpulib)) CmdArgs.push_back("-nogpulib"); } + + // For all the host OpenMP offloading compile jobs we need to pass the targets + // info

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

2024-07-24 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/100152 ___ 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-24 Thread Michael Kruse via cfe-commits
@@ -492,6 +493,18 @@ void Flang::addOffloadOptions(Compilation &C, const InputInfoList &Inputs, if (Args.hasArg(options::OPT_nogpulib)) CmdArgs.push_back("-nogpulib"); } + + // For all the host OpenMP offloading compile jobs we need to pass the targets + // info

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

2024-07-24 Thread Michael Kruse via cfe-commits
@@ -492,6 +493,18 @@ void Flang::addOffloadOptions(Compilation &C, const InputInfoList &Inputs, if (Args.hasArg(options::OPT_nogpulib)) CmdArgs.push_back("-nogpulib"); } + + // For all the host OpenMP offloading compile jobs we need to pass the targets + // info

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-07-21 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/93977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-07-19 Thread Michael Kruse via cfe-commits
@@ -5229,13 +5362,288 @@ static void emitTargetOutlinedFunction( OMPBuilder.emitTargetRegionFunction(EntryInfo, GenerateOutlinedFunction, true, OutlinedFn, OutlinedFnID); } +OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::emitTargetTask(

[clang] [llvm] [openmp] [Clang][OpenMP] Add interchange directive (PR #93022)

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

[clang] [llvm] [openmp] [Clang][OpenMP] Add interchange directive (PR #93022)

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

[clang] [llvm] [openmp] [Clang][OpenMP] Add interchange directive (PR #93022)

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

[clang] [llvm] [openmp] [Clang][OpenMP] Add interchange directive (PR #93022)

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

[clang] [llvm] [openmp] [Clang][OpenMP] Add interchange directive (PR #93022)

2024-07-18 Thread Michael Kruse via cfe-commits
@@ -14853,6 +14861,158 @@ StmtResult SemaOpenMP::ActOnOpenMPReverseDirective(Stmt *AStmt, buildPreInits(Context, PreInits)); } +StmtResult SemaOpenMP::ActOnOpenMPInterchangeDirective( +ArrayRef Clauses, Stmt *AStmt, SourceLocation Star

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

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

[libclc] [llvm] [libclc] Revise IDE folder structure (PR #89746)

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

[libclc] [llvm] [libclc] Revise IDE folder structure (PR #89746)

2024-07-17 Thread Michael Kruse via cfe-commits
Meinersbur wrote: @frasercrmck I intended to follow the target name, which is "prepare" in this case. I changed it in the most recent push. I may not have noticed myself because it is not used by default (llvm-spirv must have been found). Here is what it looks like (dark mode, Aliases kept col

[libclc] [llvm] [libclc] Revise IDE folder structure (PR #89746)

2024-07-17 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur updated https://github.com/llvm/llvm-project/pull/89746 >From 6f39beb9ee58d7c377dce6ba8ce69e71da5b8e09 Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Tue, 23 Apr 2024 12:55:15 +0200 Subject: [PATCH 1/8] [llvm] Revise IDE folder structure --- llvm/CMakeLists.t

[libclc] [llvm] [libclc] Revise IDE folder structure (PR #89746)

2024-07-17 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur updated https://github.com/llvm/llvm-project/pull/89746 >From 6f39beb9ee58d7c377dce6ba8ce69e71da5b8e09 Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Tue, 23 Apr 2024 12:55:15 +0200 Subject: [PATCH 1/7] [llvm] Revise IDE folder structure --- llvm/CMakeLists.t

[clang] [llvm] [openmp] [Clang][OpenMP] Add reverse directive (PR #92916)

2024-07-17 Thread Michael Kruse via cfe-commits
@@ -15749,6 +15757,186 @@ StmtResult SemaOpenMP::ActOnOpenMPUnrollDirective(ArrayRef Clauses, buildPreInits(Context, PreInits)); } +StmtResult SemaOpenMP::ActOnOpenMPReverseDirective(Stmt *AStmt, +

[clang] [llvm] [openmp] [Clang][OpenMP] Add reverse directive (PR #92916)

2024-07-17 Thread Michael Kruse via cfe-commits
@@ -15749,6 +15757,186 @@ StmtResult SemaOpenMP::ActOnOpenMPUnrollDirective(ArrayRef Clauses, buildPreInits(Context, PreInits)); } +StmtResult SemaOpenMP::ActOnOpenMPReverseDirective(Stmt *AStmt, +

[clang] [llvm] [openmp] [Clang][OpenMP] Add reverse directive (PR #92916)

2024-07-17 Thread Michael Kruse via cfe-commits
@@ -15749,6 +15757,186 @@ StmtResult SemaOpenMP::ActOnOpenMPUnrollDirective(ArrayRef Clauses, buildPreInits(Context, PreInits)); } +StmtResult SemaOpenMP::ActOnOpenMPReverseDirective(Stmt *AStmt, +

[clang] [llvm] [openmp] [Clang][OpenMP] Add reverse directive (PR #92916)

2024-07-17 Thread Michael Kruse via cfe-commits
@@ -15749,6 +15757,186 @@ StmtResult SemaOpenMP::ActOnOpenMPUnrollDirective(ArrayRef Clauses, buildPreInits(Context, PreInits)); } +StmtResult SemaOpenMP::ActOnOpenMPReverseDirective(Stmt *AStmt, +

[clang] [flang] [llvm] [OpenMPIRBuilder] Emit __atomic_load and __atomic_compare_exchange libcalls for complex types in atomic update (PR #92364)

2024-07-09 Thread Michael Kruse via cfe-commits
@@ -6033,6 +6034,52 @@ std::pair OpenMPIRBuilder::emitAtomicUpdate( Res.second = Res.first; else Res.second = emitRMWOpAsInstruction(Res.first, Expr, RMWOp); + } else if (RMWOp == llvm::AtomicRMWInst::BinOp::BAD_BINOP) { Meinersbur wrote: `BA

[clang] [flang] [llvm] [OpenMPIRBuilder] Emit __atomic_load and __atomic_compare_exchange libcalls for complex types in atomic update (PR #92364)

2024-07-09 Thread Michael Kruse via cfe-commits
@@ -6033,6 +6034,52 @@ std::pair OpenMPIRBuilder::emitAtomicUpdate( Res.second = Res.first; else Res.second = emitRMWOpAsInstruction(Res.first, Expr, RMWOp); + } else if (RMWOp == llvm::AtomicRMWInst::BinOp::BAD_BINOP) { +LoadInst *OldVal = +Builde

[clang] [flang] [llvm] [OpenMPIRBuilder] Emit __atomic_load and __atomic_compare_exchange libcalls for complex types in atomic update (PR #92364)

2024-07-09 Thread Michael Kruse via cfe-commits
@@ -6033,6 +6034,52 @@ std::pair OpenMPIRBuilder::emitAtomicUpdate( Res.second = Res.first; else Res.second = emitRMWOpAsInstruction(Res.first, Expr, RMWOp); + } else if (RMWOp == llvm::AtomicRMWInst::BinOp::BAD_BINOP) { +LoadInst *OldVal = +Builde

[clang] [flang] [llvm] [OpenMPIRBuilder] Emit __atomic_load and __atomic_compare_exchange libcalls for complex types in atomic update (PR #92364)

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

[clang] [flang] [llvm] [OpenMPIRBuilder] Emit __atomic_load and __atomic_compare_exchange libcalls for complex types in atomic update (PR #92364)

2024-07-09 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur commented: I see you squashed in my proposed refactoring of AtomicInfo. I think it should be its own PR. It also was just a sketch and needs to be completed (`check-clang` is failing) and needs some cleanup (`auto` -> type, `emitAtomicLibcalls2`). Ideally, it woul

[clang] [flang] [mlir] Avoid object libraries in the VS IDE (PR #93519)

2024-07-08 Thread Michael Kruse via cfe-commits
Meinersbur wrote: @dpalermo I added fix as PR #98072 https://github.com/llvm/llvm-project/pull/93519 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Ensure ToolChain::LibraryPaths is not empty for non-Darwin (PR #87866)

2024-07-08 Thread Michael Kruse via cfe-commits
Meinersbur wrote: Using git bisect, I tracked down Flang not working anymore on Windows to this PR: ``` > flang-new hello.f90 -o hello flang-new version 19.0.0git Target: x86_64-pc-windows-msvc Thread model: posix InstalledDir: C:\Users\meinersbur\build\llvm-project\release\bin Build config: +a

[clang] [llvm] [openmp] [Clang][OpenMP] Add reverse directive (PR #92916)

2024-06-21 Thread Michael Kruse via cfe-commits
Meinersbur wrote: #92916 has been accepted, but waiting for this PR. https://github.com/llvm/llvm-project/pull/92916 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [mlir] Avoid object libraries in the VS IDE (PR #93519)

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

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-07 Thread Michael Kruse via cfe-commits
@@ -5229,13 +5362,288 @@ static void emitTargetOutlinedFunction( OMPBuilder.emitTargetRegionFunction(EntryInfo, GenerateOutlinedFunction, true, OutlinedFn, OutlinedFnID); } +OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::emitTargetTask(

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-07 Thread Michael Kruse via cfe-commits
@@ -681,7 +681,30 @@ convertOmpTeams(omp::TeamsOp op, llvm::IRBuilderBase &builder, ompLoc, bodyCB, numTeamsLower, numTeamsUpper, threadLimit, ifExpr)); return bodyGenStatus; } - +static void +buildDependData(std::optional depends, OperandRange dependVars, +

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-07 Thread Michael Kruse via cfe-commits
@@ -5229,13 +5362,288 @@ static void emitTargetOutlinedFunction( OMPBuilder.emitTargetRegionFunction(EntryInfo, GenerateOutlinedFunction, true, OutlinedFn, OutlinedFnID); } +OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::emitTargetTask(

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-07 Thread Michael Kruse via cfe-commits
@@ -5229,13 +5362,288 @@ static void emitTargetOutlinedFunction( OMPBuilder.emitTargetRegionFunction(EntryInfo, GenerateOutlinedFunction, true, OutlinedFn, OutlinedFnID); } +OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::emitTargetTask(

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-07 Thread Michael Kruse via cfe-commits
@@ -5229,13 +5362,288 @@ static void emitTargetOutlinedFunction( OMPBuilder.emitTargetRegionFunction(EntryInfo, GenerateOutlinedFunction, true, OutlinedFn, OutlinedFnID); } +OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::emitTargetTask(

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-07 Thread Michael Kruse via cfe-commits
@@ -5229,13 +5362,288 @@ static void emitTargetOutlinedFunction( OMPBuilder.emitTargetRegionFunction(EntryInfo, GenerateOutlinedFunction, true, OutlinedFn, OutlinedFnID); } +OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::emitTargetTask(

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-07 Thread Michael Kruse via cfe-commits
@@ -681,7 +681,30 @@ convertOmpTeams(omp::TeamsOp op, llvm::IRBuilderBase &builder, ompLoc, bodyCB, numTeamsLower, numTeamsUpper, threadLimit, ifExpr)); return bodyGenStatus; } - +static void Meinersbur wrote: [nit] ```suggestion static void ``` htt

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-07 Thread Michael Kruse via cfe-commits
@@ -5212,6 +5273,78 @@ static Function *createOutlinedFunction( return Func; } +// Create an entry point for a target task with the following. +// It'll have the following signature +// void @.omp_target_task_proxy_func(i32 %thread.id, ptr %task) +// This function is called

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-07 Thread Michael Kruse via cfe-commits
@@ -5212,6 +5273,78 @@ static Function *createOutlinedFunction( return Func; } +// Create an entry point for a target task with the following. +// It'll have the following signature +// void @.omp_target_task_proxy_func(i32 %thread.id, ptr %task) +// This function is called

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-07 Thread Michael Kruse via cfe-commits
@@ -5212,6 +5273,78 @@ static Function *createOutlinedFunction( return Func; } +// Create an entry point for a target task with the following. +// It'll have the following signature +// void @.omp_target_task_proxy_func(i32 %thread.id, ptr %task) +// This function is called

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-07 Thread Michael Kruse via cfe-commits
@@ -5212,6 +5273,78 @@ static Function *createOutlinedFunction( return Func; } +// Create an entry point for a target task with the following. +// It'll have the following signature +// void @.omp_target_task_proxy_func(i32 %thread.id, ptr %task) +// This function is called

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-07 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur commented: Conceptually, looks quite good. Just some style comments. https://github.com/llvm/llvm-project/pull/93977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

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

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-07 Thread Michael Kruse via cfe-commits
@@ -5229,13 +5362,288 @@ static void emitTargetOutlinedFunction( OMPBuilder.emitTargetRegionFunction(EntryInfo, GenerateOutlinedFunction, true, OutlinedFn, OutlinedFnID); } +OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::emitTargetTask(

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

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

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

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

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

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

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

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

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-06 Thread Michael Kruse via cfe-commits
@@ -1762,6 +1762,26 @@ class OpenMPIRBuilder { EmitFallbackCallbackTy EmitTargetCallFallbackCB, TargetKernelArgs &Args, Value *DeviceID, Value *RTLoc, InsertPointTy AllocaIP); + /// Generate a target-task for the target construct + /// + /// \param OutlinedFn Th

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-06 Thread Michael Kruse via cfe-commits
@@ -1698,6 +1701,64 @@ void OpenMPIRBuilder::createTaskyield(const LocationDescription &Loc) { emitTaskyieldImpl(Loc); } +// Processes the dependencies in Dependencies and does the following +// - Allocates space on the stack of an array of DependInfo objects +// - Populate

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-06 Thread Michael Kruse via cfe-commits
@@ -1698,6 +1701,64 @@ void OpenMPIRBuilder::createTaskyield(const LocationDescription &Loc) { emitTaskyieldImpl(Loc); } +// Processes the dependencies in Dependencies and does the following +// - Allocates space on the stack of an array of DependInfo objects +// - Populate

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-06 Thread Michael Kruse via cfe-commits
@@ -2253,7 +2275,8 @@ class OpenMPIRBuilder { SmallVectorImpl &Inputs, GenMapInfoCallbackTy GenMapInfoCB, TargetBodyGenCallbackTy BodyGenCB, - TargetGenArgAccessor

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-06 Thread Michael Kruse via cfe-commits
@@ -1698,6 +1701,64 @@ void OpenMPIRBuilder::createTaskyield(const LocationDescription &Loc) { emitTaskyieldImpl(Loc); } +// Processes the dependencies in Dependencies and does the following +// - Allocates space on the stack of an array of DependInfo objects +// - Populate

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

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

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-06 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur commented: Not a full a review, but the first notes that I started with https://github.com/llvm/llvm-project/pull/93977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [flang] [mlir] Avoid object libraries in the VS IDE (PR #93519)

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

[clang] [flang] [mlir] Avoid object libraries in the VS IDE (PR #93519)

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

[clang] [flang] [mlir] Avoid object libraries in the VS IDE (PR #93519)

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

[clang] [flang] [mlir] Avoid object libraries in the VS IDE (PR #93519)

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

[clang] [flang] [Flang][OpenMP] Add -fopenmp-force-usm option to flang (PR #94359)

2024-06-04 Thread Michael Kruse via cfe-commits
@@ -172,13 +174,17 @@ struct OffloadModuleOpts { module.getOperation())) { offloadMod.setIsTargetDevice(Opts.OpenMPIsTargetDevice); offloadMod.setIsGPU(Opts.OpenMPIsGPU); +if (Opts.OpenMPForceUSM) { + offloadMod.setRequires(mlir::omp::ClauseRequires::

[clang] [flang] [Flang][OpenMP] Add -fopenmp-force-usm option to flang (PR #94359)

2024-06-04 Thread Michael Kruse via cfe-commits
@@ -766,6 +766,8 @@ void Flang::ConstructJob(Compilation &C, const JobAction &JA, Args.AddAllArgs(CmdArgs, options::OPT_fopenmp_version_EQ); // FIXME: Clang supports a whole bunch more flags here. Meinersbur wrote: The FIXME should stay behind al

[clang] [flang] [Flang][OpenMP] Add -fopenmp-force-usm option to flang (PR #94359)

2024-06-04 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/94359 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [Flang][OpenMP] Add -fopenmp-force-usm option to flang (PR #94359)

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

[clang] [llvm] [openmp] [Clang][OpenMP] Add reverse directive (PR #92916)

2024-06-04 Thread Michael Kruse via cfe-commits
Meinersbur wrote: @alexey-bataev ping https://github.com/llvm/llvm-project/pull/92916 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [mlir] Avoid object libraries in the VS IDE (PR #93519)

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

[clang] [flang] [mlir] Avoid object libraries in the VS IDE (PR #93519)

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

[clang] [flang] [mlir] Avoid object libraries in the VS IDE (PR #93519)

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

[clang] [flang] [mlir] Avoid object libraries in the VS IDE (PR #93519)

2024-05-28 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur created https://github.com/llvm/llvm-project/pull/93519 As discussed in #89743, when using the Visual Studio solution generators, object library projects are displayed as a collection of non-editable *.obj files. To look for the corresponding source files, one has

[clang-tools-extra] 5fb3830 - [clang-tools-extra] Remove redundant FOLDER property. NFC.

2024-05-27 Thread Michael Kruse via cfe-commits
Author: Michael Kruse Date: 2024-05-27T17:42:32+02:00 New Revision: 5fb38307f372555cd22fd09ace86c3b1ccd2abb9 URL: https://github.com/llvm/llvm-project/commit/5fb38307f372555cd22fd09ace86c3b1ccd2abb9 DIFF: https://github.com/llvm/llvm-project/commit/5fb38307f372555cd22fd09ace86c3b1ccd2abb9.diff

  1   2   3   >