[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-05-14 Thread Michael Kruse via cfe-commits
Meinersbur wrote: > ```c > #pragma omp simd reduction(+:v0) > #pragma unroll(4) > ``` That's not supposed to work. I think in the past the unroll pragma was just dropped. If the debug info is the issue, there hasn't been a lot of care to get OpenMP emit correct debug info, see e.g. #110700.

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

2025-05-13 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur updated https://github.com/llvm/llvm-project/pull/137828 Rate limit ยท GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,san

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

2025-05-12 Thread Michael Kruse via cfe-commits
@@ -299,6 +310,18 @@ elseif (FLANG_RT_GCC_RESOURCE_DIR) endif () endif () + + +if (CMAKE_C_BYTE_ORDER STREQUAL "BIG_ENDIAN") Meinersbur wrote: I had the same problem as you: CMake does not determine endianness when cross-compiling. This is leftover from my

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

2025-05-12 Thread Michael Kruse via cfe-commits
@@ -88,6 +117,67 @@ set(host_sources unit-map.cpp ) +# Module sources that are required by other modules +set(intrinsics_sources + __fortran_builtins.f90 +) + + +#set_property(SOURCE "__fortran_type_info.f90" APPEND PROPERTY OBJECT_DEPENDS "/home/meinersbur/build/llvm-pro

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

2025-05-12 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] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-05-07 Thread Michael Kruse via cfe-commits
Meinersbur wrote: > Just want to make sure: Should it be > `$prefix/lib/clang/${LLVM_VERSION_MAJOR}/finclude//*.mod`? That is correct, I forgot the version number that is part of the resource directory. https://github.com/llvm/llvm-project/pull/137828 ___

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

2025-04-29 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-04-29 Thread Michael Kruse via cfe-commits
Meinersbur wrote: While I appreciate the review, it is not yet in the state that warants one. It is still in an experimentation stage, so I did not yet care about formatting. There are also a lot of changes in here that will eventually not be needed. Goals are: 1. Currently modules files are

[clang] [llvm] [mlir] [OMPIRBuilder] Don't discard the debug record from entry block. (PR #135161)

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

[clang] [llvm] [mlir] [mlir][OpenMP] Convert omp.cancel sections to LLVMIR (PR #137193)

2025-04-29 Thread Michael Kruse via cfe-commits
@@ -2264,6 +2263,14 @@ OpenMPIRBuilder::InsertPointOrErrorTy OpenMPIRBuilder::createSections( AfterIP = {FiniBB, FiniBB->begin()}; } + // Now we can fix the dummy branch to point to the right place + if (!CancellationBranches.empty()) { Meinersbur wro

[clang] [llvm] [mlir] [mlir][OpenMP] Convert omp.cancel sections to LLVMIR (PR #137193)

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

[clang] [llvm] [mlir] [mlir][OpenMP] Convert omp.cancel sections to LLVMIR (PR #137193)

2025-04-29 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/137193 ___ 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-04-23 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited 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-04-23 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-04-23 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur commented: Unfortuantely IIRC there is a semantic difference between pragma and metadata: * llvm.loop.vectorize.enable==false disables vectorization AND interleaving (by switching off the entire LoopVectorize pass which does both of thise things) * llvm.loop.vect

[clang] [llvm] [openmp] [OpenMP] Change build of OpenMP device runtime to be a separate runtime (PR #136729)

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

[clang] [llvm] [openmp] [OpenMP] Change build of OpenMP device runtime to be a separate runtime (PR #136729)

2025-04-23 Thread Michael Kruse via cfe-commits
@@ -113,6 +113,13 @@ else() set(CMAKE_CXX_EXTENSIONS NO) endif() +# Emit a warning for people who haven't updated their build. +if(NOT "openmp" IN_LIST RUNTIMES_amdgcn-amd-amdhsa_LLVM_ENABLE_RUNTIMES AND + NOT "openmp" IN_LIST RUNTIMES_nvptx64-nvidia-cuda_LLVM_ENABLE_RUNTI

[clang] [llvm] [openmp] [OpenMP] Change build of OpenMP device runtime to be a separate runtime (PR #136729)

2025-04-23 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur commented: I think using the LLVM_ENABLE_RUNTIMES-machanism is a great idea. Regarding the move back to `openmp/device`, I don't really have an opinion. However, there are some arguments to make: 1. The same arguments apply to `libomptarget` as well 2. Definitions

[clang] [llvm] [openmp] [OpenMP] Change build of OpenMP device runtime to be a separate runtime (PR #136729)

2025-04-23 Thread Michael Kruse via cfe-commits
@@ -122,35 +130,41 @@ else() get_clang_resource_dir(LIBOMP_HEADERS_INSTALL_PATH SUBDIR include) endif() -# Build host runtime library, after LIBOMPTARGET variables are set since they are needed -# to enable time profiling support in the OpenMP runtime. -add_subdirectory(run

[clang] [llvm] [OpenMP] Update the bitcode library install and search path (PR #136754)

2025-04-23 Thread Michael Kruse via cfe-commits
@@ -2794,6 +2794,11 @@ void tools::addOpenMPDeviceRTL(const Driver &D, for (const auto &LibPath : HostTC.getFilePaths()) LibraryPaths.emplace_back(LibPath); + // Check the target specific library path for the triple as well. + SmallString<128> P(D.Dir); + llvm::sys::p

[clang] [flang] [driver] Generalize the code that adds the path of libflang_rt.runtime.a. (PR #134362)

2025-04-07 Thread Michael Kruse via cfe-commits
Meinersbur wrote: This PR may allow us to build the shared library by default https://github.com/llvm/llvm-project/blob/6c7c8b4776f51dc66138f71333e6ada0c33ca5e2/flang-rt/CMakeLists.txt#L159-L165 I would generally prefer if we could avoid having driver behavior depend on the existance of files,

[clang] [flang] [llvm] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

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

[clang] [flang] [llvm] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

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

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

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

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-03-28 Thread Michael Kruse via cfe-commits
@@ -44,23 +44,19 @@ MDNode *LoopInfo::createPipeliningMetadata(const LoopAttributes &Attrs, else if (Attrs.PipelineInitiationInterval != 0) Enabled = true; + SmallVector Args; + Args.append(LoopProperties.begin(), LoopProperties.end()); + if (Enabled != true) { -

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-03-27 Thread Michael Kruse via cfe-commits
@@ -44,23 +44,19 @@ MDNode *LoopInfo::createPipeliningMetadata(const LoopAttributes &Attrs, else if (Attrs.PipelineInitiationInterval != 0) Enabled = true; + SmallVector Args; + Args.append(LoopProperties.begin(), LoopProperties.end()); + if (Enabled != true) { -

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-03-26 Thread Michael Kruse via cfe-commits
@@ -227,36 +226,26 @@ void for_test_scalable_1(int *List, int Length) { // CHECK: ![[LOOP_5]] = distinct !{![[LOOP_5]], ![[UNROLL_DISABLE:.*]], ![[DISTRIBUTE_DISABLE:.*]], ![[WIDTH_1:.*]]} // CHECK: ![[WIDTH_1]] = !{!"llvm.loop.vectorize.width", i32 1} -// CHECK: ![[LOOP_6]]

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

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

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-03-26 Thread Michael Kruse via cfe-commits
@@ -170,11 +161,10 @@ LoopInfo::createUnrollAndJamMetadata(const LoopAttributes &Attrs, MDNode::get(Ctx, MDString::get(Ctx, "llvm.loop.unroll_and_jam.disable"))); bool FollowupHasTransforms = false; - MDNode *Followup = createPartialUnrollMetadata(Attrs, FollowupLoo

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-03-26 Thread Michael Kruse via cfe-commits
@@ -44,23 +44,19 @@ MDNode *LoopInfo::createPipeliningMetadata(const LoopAttributes &Attrs, else if (Attrs.PipelineInitiationInterval != 0) Enabled = true; + SmallVector Args; + Args.append(LoopProperties.begin(), LoopProperties.end()); + if (Enabled != true) { -

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-03-26 Thread Michael Kruse via cfe-commits
@@ -44,23 +44,19 @@ MDNode *LoopInfo::createPipeliningMetadata(const LoopAttributes &Attrs, else if (Attrs.PipelineInitiationInterval != 0) Enabled = true; + SmallVector Args; + Args.append(LoopProperties.begin(), LoopProperties.end()); + if (Enabled != true) { -

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-03-26 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur approved this pull request. LGTM, great work! https://github.com/llvm/llvm-project/pull/131985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Flang] Link `-lflang_rt.runtime` if available on the device (PR #132737)

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

[clang] [Flang] Link `-lflang_rt.runtime` if available on the device (PR #132737)

2025-03-24 Thread Michael Kruse via cfe-commits
@@ -9337,6 +9337,11 @@ void LinkerWrapper::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back( Args.MakeArgString("--device-linker=" + TC.getTripleString() + "=" + "-lclang_rt.builtins")); + bool HasFlan

[clang] [llvm] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

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

[clang] [llvm] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

2025-03-17 Thread Michael Kruse via cfe-commits
@@ -101,3 +102,19 @@ bool PPCLinuxToolChain::SupportIEEEFloat128( return GlibcSupportsFloat128((Twine(D.DyldPrefix) + Linker).str()) && !(D.CCCIsCXX() && HasUnsupportedCXXLib); } + +void PPCLinuxToolChain::addFortranRuntimeLibs( +const ArgList &Args, llvm::opt::A

[clang] [llvm] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

2025-03-17 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur commented: Approach look OK to me. Could you add test(s) along the lines of [aix-rlib.c](https://github.com/llvm/llvm-project/blob/main/clang/test/Driver/aix-rtlib.c). If we make further changes, knowing what is expected on AIX/PPCLunux would be very helpful. A

[clang] [Clang] Remove use of 'temporary' toolchains for offload deduction (PR #131332)

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

[clang] [Clang] Remove use of 'temporary' toolchains for offload deduction (PR #131332)

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

[clang] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

2025-03-13 Thread Michael Kruse via cfe-commits
@@ -1345,7 +1345,16 @@ void tools::addFortranRuntimeLibs(const ToolChain &TC, const ArgList &Args, if (AsNeeded) addAsNeededOption(TC, Args, CmdArgs, /*as_needed=*/false); } -CmdArgs.push_back("-lflang_rt.runtime"); +if (TC.getTriple().isOSAIX()) { +

[clang] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

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

[clang] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

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

[clang] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

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

[clang] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

2025-03-13 Thread Michael Kruse via cfe-commits
Meinersbur wrote: > Right. I tried with `FLANG_RT_ENABLE_SHARED=ON` on AIX. I was able to > dynamically link to the shared `flang-rt` and execute the `a.out` > successfully. With this PR applied? It hardcodes `libflang_rt.runtime.a` on AIX, how can it find the `.so`? > As for buildCompilerRT

[clang] [flang] [lld] [llvm] [Flang] LLVM_ENABLE_RUNTIMES=flang-rt (PR #110217)

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

[clang] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

2025-03-12 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur commented: This is what I would like to do more generally, not just for AIX. This PR however will break using a shared library libflang_rt.runtime.so. Ideally, we would synchronize with the compiler-rt implementation which already has many supporting functions su

[clang] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

2025-03-12 Thread Michael Kruse via cfe-commits
@@ -1345,7 +1345,16 @@ void tools::addFortranRuntimeLibs(const ToolChain &TC, const ArgList &Args, if (AsNeeded) addAsNeededOption(TC, Args, CmdArgs, /*as_needed=*/false); } -CmdArgs.push_back("-lflang_rt.runtime"); +if (TC.getTriple().isOSAIX()) { +

[clang] [LinkerWrapper] Try to fix testing on Windows (PR #130285)

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

[clang] [LinkerWrapper] Try to fix testing on Windows (PR #130285)

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

[clang] [LinkerWrapper] Try to fix testing on Windows (PR #130285)

2025-03-07 Thread Michael Kruse via cfe-commits
@@ -599,9 +599,11 @@ Expected writeOffloadFile(const OffloadFile &File) { StringRef Prefix = sys::path::stem(Binary.getMemoryBufferRef().getBufferIdentifier()); - - auto TempFileOrErr = createOutputFile( - Prefix + "-" + Binary.getTriple() + "-" + Binary.getArch

[clang] [LinkerWrapper] Try to fix testing on Windows (PR #130285)

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

[clang] [LinkerWrapper] Try to fix testing on Windows (PR #130285)

2025-03-07 Thread Michael Kruse via cfe-commits
@@ -599,9 +599,11 @@ Expected writeOffloadFile(const OffloadFile &File) { StringRef Prefix = sys::path::stem(Binary.getMemoryBufferRef().getBufferIdentifier()); - - auto TempFileOrErr = createOutputFile( - Prefix + "-" + Binary.getTriple() + "-" + Binary.getArch

[clang] [LinkerWrapper] Try to fix testing on Windows (PR #130285)

2025-03-07 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur requested changes to this pull request. Not aware of any filename sanitizer utility either. https://github.com/llvm/llvm-project/pull/130285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] clang: Enable linker-wrapper test on windows (PR #130248)

2025-03-07 Thread Michael Kruse via cfe-commits
Meinersbur wrote: Pre-merge on Linux fails too, but different symptoms. Let me try on my machine. https://github.com/llvm/llvm-project/pull/130248 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [LinkerWrapper] Try to fix testing on Windows (PR #130285)

2025-03-07 Thread Michael Kruse via cfe-commits
@@ -599,9 +599,10 @@ Expected writeOffloadFile(const OffloadFile &File) { StringRef Prefix = sys::path::stem(Binary.getMemoryBufferRef().getBufferIdentifier()); - - auto TempFileOrErr = createOutputFile( - Prefix + "-" + Binary.getTriple() + "-" + Binary.getArch

[clang] clang: Enable linker-wrapper test on windows (PR #130248)

2025-03-07 Thread Michael Kruse via cfe-commits
Meinersbur wrote: clang-offload-wrapper tries to write a file `linker-wrapper.c.tmp-on-amdgcn-amd-amdhsa-gfx90a:xnack+-0c971c.o` in the temp directory. `:` is not a valid character in filenames one Windows. The colon comes from the `Binary.getArch()` call here: https://github.com/llvm/llvm-pr

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

2025-03-06 Thread Michael Kruse via cfe-commits
Meinersbur wrote: @tblah I don't think it is blocking cancellation, we just don't know what is going on. The `omp.par.outlined.exit` apparently was once need for cancellation points. Looking at the `cancel_codegen.cpp` test case, it seems to evantually jump to `omp.par.exit.exitStub`. That one

[clang] [flang] [lld] [llvm] [Flang] Remove FLANG_INCLUDE_RUNTIME (PR #124126)

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

[clang] [flang] [lld] [llvm] [Flang-RT] Build libflang_rt.so (PR #121782)

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

[clang] [flang] [lld] [llvm] [Flang-RT] Build libflang_rt.so (PR #121782)

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

[clang] [flang] [lld] [llvm] [Flang] LLVM_ENABLE_RUNTIMES=flang-rt (PR #110217)

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

[clang] [flang] [lld] [llvm] [Flang] LLVM_ENABLE_RUNTIMES=flang-rt (PR #110217)

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

[clang] [flang] [lld] [llvm] [Flang][NFC] Move runtime library files to flang-rt. (PR #110298)

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

[clang] [flang] [lld] [llvm] [Flang][NFC] Move runtime library files to flang-rt. (PR #110298)

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

[clang] [Offload] Treat an empty packager archicture as 'generic' (PR #126655)

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

[clang] [Offload] Treat an empty packager architecture as 'generic' (PR #126655)

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

[clang] [Offload] Treat an empty packager archicture as 'generic' (PR #126655)

2025-02-11 Thread Michael Kruse via cfe-commits
Meinersbur wrote: What happens with `-march` not specified? I only know about gcc falling back on `-march=x86-64`, but depends on the target triple. https://github.com/llvm/llvm-project/pull/126655 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [Offload] Treat an empty packager archicture as 'generic' (PR #126655)

2025-02-11 Thread Michael Kruse via cfe-commits
@@ -474,7 +474,7 @@ Expected clang(ArrayRef InputFiles, const ArgList &Args) { const llvm::Triple Triple(Args.getLastArgValue(OPT_triple_EQ)); StringRef Arch = Args.getLastArgValue(OPT_arch_EQ); - if (Arch.empty()) + if (Arch.empty() || Arch == "generic") --

[clang] [flang] [lld] [llvm] [Flang][NFC] Move runtime library files to flang-rt. (PR #110298)

2025-02-10 Thread Michael Kruse via cfe-commits
Meinersbur wrote: The intention was to leave the files included in both, runtime and compile, inside the `flang/` subtree. This leaves cross-project include-dependencies only in one direction: "flang-rt" -> "flang/include". This applies header files in "flang/include/Common" and "flang/include

[clang] [flang] [lld] [llvm] [Flang][NFC] Move runtime library files to flang-rt. (PR #110298)

2025-02-10 Thread Michael Kruse via cfe-commits
Meinersbur wrote: @clementval You agreed to a new folder structure in https://discourse.llvm.org/t/rfc-names-for-flang-rt-libraries/84321/4. Could you please review this PR again? The "Check code formatting" stage does not pass by design. For moved/renamed files it requires a complete reforma

[clang] [flang] [lld] [llvm] [Flang][NFC] Move runtime library files to flang-rt. (PR #110298)

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

[clang] [flang] [lld] [Flang] Rename libFortranRuntime.a to libflang_rt.runtime.a (PR #122341)

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

[clang] [flang] [lld] [Flang] Rename libFortranRuntime.a to libflang_rt.runtime.a (PR #122341)

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

[clang] [flang] [lld] [Flang] Rename libFortranRuntime.a to libflang_rt.runtime.a (PR #122341)

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

[clang] [flang] [lld] [Flang] Rename libFortranRuntime.a to libflang_rt.a (PR #122341)

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

[clang] [flang] [lld] [Flang] Optionally do not compile the runtime in-tree (PR #122336)

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

[clang] [llvm] [OpenMP] Remove 'libomptarget.devicertl.a' fatbinary and use static library (PR #126143)

2025-02-07 Thread Michael Kruse via cfe-commits
Meinersbur wrote: We already have a host-side `libomptarget`: https://github.com/llvm/llvm-project/blob/cfd8980fe79872feb9ed81959aa018681c7b3354/offload/src/CMakeLists.txt#L9 https://github.com/llvm/llvm-project/pull/126143 ___ cfe-commits mailing list

[clang] [flang] [lld] [Flang] Optionally do not compile the runtime in-tree (PR #122336)

2025-02-07 Thread Michael Kruse via cfe-commits
Meinersbur wrote: This PR still needs a review https://github.com/llvm/llvm-project/pull/122336 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [lld] [Flang] Optionally do not compile the runtime in-tree (PR #122336)

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

[clang] [flang] [lld] [Flang] Optionally do not compile the runtime in-tree (PR #122336)

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

[clang] [llvm] [Clang][Driver] Add an option to control loop-interchange (PR #125830)

2025-02-07 Thread Michael Kruse via cfe-commits
Meinersbur wrote: The OpenMP pragma conceptually applies interchange in the frontend, with syntactical requirements for the loops it applies to. https://github.com/llvm/llvm-project/pull/125830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

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

2025-02-07 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur closed 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] [llvm] [OpenMP] Remove 'libomptarget.devicertl.a' fatbinary and use static library (PR #126143)

2025-02-07 Thread Michael Kruse via cfe-commits
Meinersbur wrote: I second @shiltian's concern. Host-side and device-side libraries should have different names[^1] if there differences between them. We have host-offloading as well. [^1]: Unless they would be interchangeable, i.e. contains host-side libomp, libomptarget AND device device-si

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

2025-02-06 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] [llvm] [Clang][Driver] Add an option to control loop-interchange (PR #125830)

2025-02-06 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur approved this pull request. LGTM Dont forget clang-format (https://github.com/llvm/llvm-project/pull/125830#issuecomment-2639658025) https://github.com/llvm/llvm-project/pull/125830 ___ cfe-commits mailing list cfe-commi

[clang] [llvm] [Clang][Driver] Add an option to control loop-interchange (PR #125830)

2025-02-06 Thread Michael Kruse via cfe-commits
@@ -316,6 +312,7 @@ PipelineTuningOptions::PipelineTuningOptions() { LoopVectorization = true; SLPVectorization = false; LoopUnrolling = true; + LoopInterchange = false; Meinersbur wrote: The default of `LoopInterchange` could be initialized with `Enab

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

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

[clang] [Clang][Driver] Add an option to control loop-interchange (PR #125830)

2025-02-05 Thread Michael Kruse via cfe-commits
Meinersbur wrote: The other optimzation pass options (unrolll, vectorize, ...) are implemented in `PipelineTuningOptions` and `CodeGenOptions.def`. Do it the same way? https://github.com/llvm/llvm-project/pull/125830 ___ cfe-commits mailing list cfe-

[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

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

[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-27 Thread Michael Kruse via cfe-commits
@@ -1,46 +1,89 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp45 -fopenmp -fopenmp-version=45 -fnoopenmp-use-tls -ferror-limit 100 -o - %s -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp5,host5 -fopenmp -fopenmp-version=50

[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-27 Thread Michael Kruse via cfe-commits
@@ -1,46 +1,89 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp45 -fopenmp -fopenmp-version=45 -fnoopenmp-use-tls -ferror-limit 100 -o - %s -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp5,host5 -fopenmp -fopenmp-version=50

[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-27 Thread Michael Kruse via cfe-commits
@@ -254,4 +256,3 @@ int main(int argc, char **argv) { foomain(argc,argv); // expected-note {{n instantiation of function template specialization 'foomain' requested here}} return 0; } - Meinersbur wrote: [nit] unrelated change https://github.com/llvm/llv

[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-27 Thread Michael Kruse via cfe-commits
@@ -1,46 +1,89 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp45 -fopenmp -fopenmp-version=45 -fnoopenmp-use-tls -ferror-limit 100 -o - %s -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp5,host5 -fopenmp -fopenmp-version=50

[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-27 Thread Michael Kruse via cfe-commits
@@ -205,77 +262,134 @@ namespace { } #pragma omp end declare target -#pragma omp declare target link(S) // expected-error {{'S' used in declare target directive is not a variable or a function name}} +// expected-error@+1 {{'S' used in declare target directive is not a variab

[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-27 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur commented: Some nitpicks left. I will LGTM this after you applied them and nobody else has remarks. Converting all the lines to `@+` syntax would not have been necessary, only those you needed to change. I think it has become a lot more maintainable now. For pref

[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

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

[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-27 Thread Michael Kruse via cfe-commits
@@ -68,15 +70,21 @@ int fun(int arg) { {} #pragma omp target map(mapper(aa :vv) // expected-error {{use of undeclared identifier 'aa'}} expected-error {{expected ')'}} expected-error {{call to undeclared function 'mapper'}} expected-note

[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-27 Thread Michael Kruse via cfe-commits
@@ -205,77 +262,134 @@ namespace { } #pragma omp end declare target -#pragma omp declare target link(S) // expected-error {{'S' used in declare target directive is not a variable or a function name}} +// expected-error@+1 {{'S' used in declare target directive is not a variab

[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-27 Thread Michael Kruse via cfe-commits
@@ -68,15 +70,21 @@ int fun(int arg) { {} #pragma omp target map(mapper(aa :vv) // expected-error {{use of undeclared identifier 'aa'}} expected-error {{expected ')'}} expected-error {{call to undeclared function 'mapper'}} expected-note

[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-27 Thread Michael Kruse via cfe-commits
@@ -124,4 +124,3 @@ target *S1 = &S; // CHECK-NEXT: #pragma omp declare target // CHECK-NEXT: target *S1 = &S; // CHECK-NEXT: #pragma omp end declare target - Meinersbur wrote: [nit] unrelated change https://github.com/llvm/llvm-project/pull/122108 __

  1   2   3   4   >