[PATCH] D142486: [OpenMP] Unconditionally link the OpenMP device RTL static library

2023-01-24 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert added a comment. This revision is now accepted and ready to land. LG Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142486/new/ https://reviews.llvm.org/D142486 ___

[PATCH] D140415: [flang] stack arrays pass

2023-01-25 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Quick questions, and they might not apply here since you seem to only look at explicit Flang generated values, right? Are you handling unwinding/exceptions, especially in-between the allocation and deallocation? Are you handling non-accessible stacks (e.g., on GPUs) fo

[PATCH] D142569: [WIP][OpenMP] Introduce kernel argument

2023-01-25 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Link the old review too. Pre-commit, w/o review, the file rename and include changes. Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:246 + GET_KERNEL_ENVIRONMENT_MEMBER(Configuration, DL, StructC)), \ + V)) + --

[PATCH] D142569: [WIP][OpenMP] Introduce kernel argument

2023-01-25 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: openmp/libomptarget/DeviceRTL/src/Configuration.cpp:57 + return !__omp_rtl_assume_no_nested_parallelism || + state::getKernelEnvironment().Configuration.MayUseNestedParallelism; } This looks wrong. We want ei

[PATCH] D131306: [llvm][misexpect] Track provenance of branch weights

2023-01-25 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Drive by: There should be a lang ref component to this. Also, changing branch weight metadata might impact downstream users, an RFC seems in order (assuming I didn't miss one). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D141910: [OpenMP][OMPIRBuilder]Move SIMD alignment calculation to LLVM Frontend

2023-01-26 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert added a comment. LG Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141910/new/ https://reviews.llvm.org/D141910 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D142650: [OpenMP] Run an extra 'OpenMPOpt' pass in LTO-mode

2023-01-26 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert added a comment. This revision is now accepted and ready to land. LG, one nit. Comment at: llvm/lib/Passes/PassBuilderPipelines.cpp:1720 + MPM.addPass(OpenMPOptPass(ThinOrFullLTOPhase::FullLTOPostLink)); + // If we didn't decide t

[PATCH] D141528: [Clang][OpenMP] Fix loop directive nested inside a parallel

2023-01-11 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Drive by. Comment at: clang/test/OpenMP/nested_loop_codegen.cpp:32 + +int internal_decl() { + int i, res; Internal? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141528/new/ https://r

[PATCH] D141540: [OpenMP][5.1] Support `thread_limit` on `omp target`

2023-01-11 Thread Johannes Doerfert via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG5e4369e53d3c: [OpenMP][5.1] Support `thread_limit` on `omp target` (authored by jdoerfert). Herald added a project: clang. Herald added a subscriber:

[PATCH] D141531: [OpenMP][FIX] Allow multiple `depend` clauses on a `taskwait nowait`

2023-01-11 Thread Johannes Doerfert via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa8eccca93415: [OpenMP][FIX] Allow multiple `depend` clauses on a `taskwait nowait` (authored by jdoerfert). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Git

[PATCH] D141617: OpenMP: Use inbounds in EmitOMPAggregateAssign

2023-01-12 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert added a comment. This revision is now accepted and ready to land. LG CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141617/new/ https://reviews.llvm.org/D141617 ___ cfe-commits mailing list cfe-commi

[PATCH] D141708: [OpenMP] Make `-fopenmp-target=` use the `nvptx-arch` tool

2023-01-13 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert added a comment. This revision is now accepted and ready to land. LG Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141708/new/ https://reviews.llvm.org/D141708 ___

[PATCH] D138958: [clang] Better UX for Clang’s unwind-affecting attributes

2023-01-15 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D138958#4045567 , @efriedma wrote: > From an IR semantics standpoint, I'm not sure the `memory(none)` marking is > right if the function throws an exception. LangRef doesn't explicitly > exclude the possibility, but take t

[PATCH] D140158: [CUDA] Allow targeting NVPTX directly without a host toolchain

2023-01-16 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. FWIW, creating CUBIN from C/C++ directly would be really useful when debugging (and in combination with our soon to be available JIT object loader). @tra Can we get this in somehow? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D133539: [OpenMP] Replace OpenMP register requires constructor with a global array

2023-01-20 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Generally happy with this. Some minor comments. @sandoval, this works for you? Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:3020-3025 + if (!RequiresFlags.empty()) { +for (int64_t Flag : RequiresFlags) + createRegisterRequires(CGM, Flag

[PATCH] D142138: [OpenMP] Clean up AMD handling for `-fopenmp-targets=amdgcn` arch inference

2023-01-20 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert added a comment. This revision is now accepted and ready to land. In a follow up we should default to all system archs not the first one. But let's keep them in sync. LG Comment at: clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp:100 +

[PATCH] D141232: [OpenMP] Modernize the kernel launching interface and APIs

2023-01-21 Thread Johannes Doerfert via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG16a385ba21a9: [OpenMP] Modernize the kernel launching interface and APIs (authored by jdoerfert). Herald added projects: clang, OpenMP. Herald added

[PATCH] D141232: [OpenMP] Modernize the kernel launching interface and APIs

2023-01-21 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D141232#4071310 , @ronlieb wrote: > hi, breaks our amdgpu buildbot, please fix ASAP , or revert and fix. thx > 3 patches: https://lab.llvm.org/buildbot/#/builders/193/builds/25299 > > i reverted locally and verified this pa

[PATCH] D141717: [Clang] Only emit textual LLVM-IR in device only mode

2023-01-23 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D141717#4056971 , @yaxunl wrote: > The intention of -emit-llvm -S is usually to get LLVM assembly for all > targets for inspection or modification. HIP emits a bundled LLVM assembly in > textual format in this case. Users c

[PATCH] D142393: [OpenMP] Add 'amdgpu-flat-work-group-size' to OpenMP kernels

2023-01-23 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:791 - // Get the device name and canonicalize it + // Get the ndevice name and canonicalize it const StringRef GpuArch = getGPUArch(DriverArgs); ^ Repository: rG LLVM G

[PATCH] D126984: [clang] Add support for optimize function attribute

2022-06-13 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D126984#3571573 , @aeubanks wrote: > IIRC in the past there was a strong preference to not have the pass manager > support this sort of thing > if you want to support this, there should be an RFC for how the optimization >

[PATCH] D126984: [clang] Add support for optimize function attribute

2022-06-14 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. FWIW, I think we should have these attributes as spelled here, just w/ proper pass manager integration which then requires an RFC. That said, I'm not opposed to this as an incremental step, albeit confusing until the PM support is integrated if we allow O1

[PATCH] D127901: [LinkerWrapper] Add PTX output to CUDA fatbinary in LTO-mode

2022-06-22 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Do we want JIT -> YES, but specalizing LLVM-IR JIT. Do we want/need PTX, I do not, but I don't mind having it. Someone will ask for it eventually. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127901/new/ https://reviews

[PATCH] D126331: [OpenMP] Add diagnostic for unterminated 'omp [begin] declare target'

2022-05-25 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Cool! Can we have that for begin declare variant too :D ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126331/new/ https://reviews.llvm.org/D126331 ___ cfe-commits mailing lis

[PATCH] D155606: [Clang] Only emit CUDA version warnings when creating the CUDA toolchain

2023-07-18 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. I like it Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155606/new/ https://reviews.llvm.org/D155606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[PATCH] D155606: [Clang] Only emit CUDA version warnings when creating the CUDA toolchain

2023-07-18 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. tests? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155606/new/ https://reviews.llvm.org/D155606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[PATCH] D155794: [OpenMP][OpenMPIRBuilder] Migrate setPropertyExecutionMode() from Clang to OpenMPIRBuilder.

2023-07-21 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Mostly nits. One problem I have is the vector. I do not believe Flang will use the same for their "llvm.used" tracking. I think it makes more sense to provide a callback or just return the global and let the caller handle it. Comment at: llvm/includ

[PATCH] D148216: [UTC] Add fallback support for specific metadata, and check their defs

2023-07-21 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D148216#4486400 , @jdoerfert wrote: > I might pull this later today until a fix is available. It makes updates of > files with globals super cumbersome (you need to manually remove the > duplicates). FWIW, the duplication

[PATCH] D156184: [OpenMP] Add the `ompx_attribute` clause for target directives

2023-07-24 Thread Johannes Doerfert via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGef9ec4bbcca2: [OpenMP] Add the `ompx_attribute` clause for target directives (authored by jdoerfert). Herald added a project: clang. Herald added a s

[PATCH] D154568: [Clang][OpenMP] GPU simd directive code generation

2023-07-25 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D154568#4528274 , @efwright wrote: > Dropping off a simple test case. If this looks about what you would expect > for the tests I have a couple more involved ones that I can repurpose and add > in. For more complex tests we

[PATCH] D155794: [OpenMP][OpenMPIRBuilder] Migrate setPropertyExecutionMode() from Clang to OpenMPIRBuilder.

2023-07-26 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert added a comment. This revision is now accepted and ready to land. LG, address the nits below please. Comment at: clang/lib/CodeGen/CodeGenModule.h:1017 +return LLVMCompilerUsed; + } + Unused now. ==

[PATCH] D155213: [HIP] Add `-fno-offload-uniform-block`

2023-07-26 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. This should be named -foffload*, it should not use HIP in the description, and it should apply to OpenMP as well. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155213/new/ https://reviews.llvm.org/D155213 ___ cfe-c

[PATCH] D116910: [OpenMP][3/3] Introduce the KernelEnvironment into Clang tests

2023-07-26 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert closed this revision. jdoerfert added a comment. Herald added subscribers: jplehr, sunshaoce, mattd. Herald added a project: All. Subsumed by D142569 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116910/

[PATCH] D157994: [OpenMP] Migrate dispatch related utility functions from Clang codegen to OMPIRBuilder

2023-08-15 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert added a comment. This revision is now accepted and ready to land. LG, but do not remove the Attribute from our set, add it to the tests. The functions are nounwind. Comment at: llvm/include/llvm/Frontend/OpenMP/OMPKinds.def:532

[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-08-19 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. I think this is basically done, one question though. Comment at: clang/test/OpenMP/amdgpu_exceptions.cpp:11 +// RUN: %clang_cc1 -fopenmp -triple amdgcn-amd-amdhsa -fopenmp-is-target-device -fexceptions %s -emit-llvm -S -verify=with -Wopenmp-target-e

[PATCH] D156641: [Clang][Frontend] Change help text for --offload-host-device

2023-07-31 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D156641#4547718 , @AntonRydahl wrote: > The tests that failed pass locally on my machine. If the tests are clearly not related to your change, assume they are broken before or flaky. Repository: rG LLVM Github Monorepo

[PATCH] D156816: [Clang] Make generic aliases to OpenCL address spaces

2023-08-01 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D156816#4551417 , @jhuber6 wrote: > In D156816#4551409 , @Anastasia > wrote: > >> Why not to just use target address space and define it to some macro with >> desirable spelling? >>

[PATCH] D156901: [OpenMP] Change OpenMP default version in documentation and help text for -fopenmp-version

2023-08-02 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: flang/test/Driver/driver-help.f90:55 ! HELP-NEXT: -fopenmp-version= -! HELP-NEXT:Set OpenMP version (e.g. 45 for OpenMP 4.5, 50 for OpenMP 5.0). Default value is 50 for Clang and 11 for Flang +! HELP-NEXT:

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-07-01 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: openmp/runtime/test/target/target_thread_limit.cpp:28 +// OMP51: target: parallel +// OMP51: target: parallel + This doesn't check much. You need to verify a 5th or print the team size. Same for the rest ===

[PATCH] D154036: [libc] Add support for creating wrapper headers for offloading in clang

2023-07-06 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert added a comment. If it compiles, ship it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154036/new/ https://reviews.llvm.org/D154036 ___ cfe-commits mailing li

[PATCH] D154591: [OpenMP][OMPIRBuilder] Rename IsEmbedded and IsTargetCodegen flags

2023-07-06 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a subscriber: jhuber6. jdoerfert added a comment. Works for me. Tag @jhuber6 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154591/new/ https://reviews.llvm.org/D154591 ___ cfe-commits mai

[PATCH] D154672: [OPENMP52] Deprecation of 'depend' clause in ordered directive.

2023-07-06 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert added a comment. This revision is now accepted and ready to land. LG Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154672/new/ https://reviews.llvm.org/D154672 ___

[PATCH] D154495: clang: Attach !fpmath metadata to __builtin_sqrt based on language flags

2023-07-06 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. FWIW, I assume we want this also for OpenMP offload. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154495/new/ https://reviews.llvm.org/D154495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[PATCH] D154568: [Clang][OpenMP] GPU simd directive code generation

2023-07-06 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Do you have tests? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154568/new/ https://reviews.llvm.org/D154568 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[PATCH] D154568: [Clang][OpenMP] GPU simd directive code generation

2023-07-06 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:1532 + +} + This is in large parts copied from existing code. Can we extract those parts into helper functions instead of duplicating them? Repository: rG LLVM Github Mono

[PATCH] D153725: [clang] Make amdgpu-arch tool work on Windows

2023-07-07 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/tools/amdgpu-arch/AMDGPUArchByHIP.cpp:96 + return 0; +} Where is the call to this? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153725/new/ https://reviews.llvm.org/D153725 _

[PATCH] D148216: [UTC] Add fallback support for specific metadata, and check their defs

2023-07-07 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert closed this revision. jdoerfert added a comment. When you commit things, can you please add the Differential Revision into the commit message so it is closed here and we can easily find the review for a change. Committed as 8a3fdf7b908978625e9a7e57fbb443e4e6f98976

[PATCH] D148216: [UTC] Add fallback support for specific metadata, and check their defs

2023-07-07 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert reopened this revision. jdoerfert added a comment. This revision is now accepted and ready to land. This is broken: https://github.com/llvm/llvm-project/issues/63746 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148216/new/ https://review

[PATCH] D148216: [UTC] Add fallback support for specific metadata, and check their defs

2023-07-10 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert requested changes to this revision. jdoerfert added a comment. This revision now requires changes to proceed. I might pull this later today until a fix is available. It makes updates of files with globals super cumbersome (you need to manually remove the duplicates). Repository: rG

[PATCH] D152554: [OpenMP] Migrate device code privatisation from Clang CodeGen to OMPIRBuilder

2023-07-11 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert added a comment. This revision is now accepted and ready to land. LG Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152554/new/ https://reviews.llvm.org/D152554 ___

[PATCH] D158381: [OpenMP] Properly set static thread limit (w/o analysis)

2023-08-23 Thread Johannes Doerfert via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGc5488c8dcc8c: [OpenMP] Properly set static thread limit (w/o analysis) (authored by jdoerfert). Herald added projects: clang, OpenMP. Herald added su

[PATCH] D158383: [OpenMP] Add NVIDIA annotations for static grid thread limit

2023-08-23 Thread Johannes Doerfert via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGf3958ce0086a: [OpenMP] Add NVIDIA annotations for static grid thread limit (authored by jdoerfert). Herald added a project: clang. Herald added a sub

[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-08-28 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert added a comment. This revision is now accepted and ready to land. LG, see below. Comment at: clang/lib/Sema/SemaExprCXX.cpp:869 bool IsThrownVarInScope) { - // Don't report an error if 'throw' is used

[PATCH] D159118: [libc] Implement the 'clock()' function on the GPU

2023-08-29 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: libc/src/time/gpu/clock.cpp:61-62 +return clock_t(ticks / (GPU_CLOCKS_PER_SEC / CLOCKS_PER_SEC)); + else +return clock_t(ticks * (CLOCKS_PER_SEC / GPU_CLOCKS_PER_SEC)); +} Repository: rG LLVM Github Monor

[PATCH] D138598: [OpenMP] Do not add wrapper headers if using '-nogpuinc'

2022-11-23 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert added a comment. This revision is now accepted and ready to land. LG Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138598/new/ https://reviews.llvm.org/D138598 ___

[PATCH] D138870: clang/AMDGPU: Remove flat-address-space from feature map

2022-11-28 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. The OpenMP part is fine. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138870/new/ https://reviews.llvm.org/D138870 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[PATCH] D139166: [OPENMP51] Codegen support for error directive.

2022-12-01 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.h:334 llvm::Value *emitUpdateLocation(CodeGenFunction &CGF, SourceLocation Loc, - unsigned Flags = 0); + unsigned Flags = 0, bool Em

[PATCH] D76140: [InlineFunction] update attributes during inlining

2020-03-21 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert added a comment. I'm unsure about the `zeroext` and `signext` on the call sites now but other than that I think this is good. wait for @reames OK though. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7614

[PATCH] D75591: [OpenMP] Add firstprivate as a default data-sharing attribute to clang

2020-03-22 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Did you add the warning @lebedev.ri mentioned? (@lebedev.ri I assume/hope a warning is sufficient here?) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75591/new/ https://reviews.llvm.org/D75591 ___

[PATCH] D76184: [OpenMP][NFC] Remove the need to include `OpenMPClause.h`

2020-03-23 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D76184#1927159 , @rnk wrote: > I patched this in with it's dependency, and to compile just Attr.h by itself, > it reduces the time from ~2.420s to ~1.920s, so it is worth pushing this > through. :) > > However, I noticed tha

[PATCH] D76173: [OpenMP][NFC] Minimize memory usage and copying of `OMPTraitInfo`s

2020-03-23 Thread Johannes Doerfert via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG55eca2853e4f: [OpenMP][NFC] Minimize memory usage and copying of `OMPTraitInfo`s (authored by jdoerfert). Changed prior to commit: https://reviews.llvm.org/D76173?vs=250347&id=252123#toc Repository:

[PATCH] D76184: [OpenMP][NFC] Remove the need to include `OpenMPClause.h`

2020-03-23 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D76184#1927159 , @rnk wrote: > I patched this in with it's dependency, and to compile just Attr.h by itself, > it reduces the time from ~2.420s to ~1.920s, so it is worth pushing this > through. :) > > However, I noticed tha

[PATCH] D75779: [OpenMP] `omp begin/end declare variant` - part 2, sema (+"CG")

2020-03-24 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:5396 + IdentifierInfo &VariangtII = Context.Idents.get( + (D.getIdentifier()->getName() + "." + DVScope.NameSuffix).str()); + D.SetIdentifier(&VariangtII, D.getBeginLoc()); hfinkel

[PATCH] D70366: Add new 'flatten' LLVM attribute to fix clang's 'flatten' function attribute

2020-03-25 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Herald added a subscriber: kerbowa. [reverse ping] Is this still active? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70366/new/ https://reviews.llvm.org/D70366 ___ cfe-comm

[PATCH] D75779: [OpenMP] `omp begin/end declare variant` - part 2, sema (+"CG")

2020-03-25 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:5396 + IdentifierInfo &VariangtII = Context.Idents.get( + (D.getIdentifier()->getName() + "." + DVScope.NameSuffix).str()); + D.SetIdentifier(&VariangtII, D.getBeginLoc()); hfinkel

[PATCH] D74941: [OpenMP] `omp begin/end declare variant` - part 1, parsing

2020-03-27 Thread Johannes Doerfert via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG095cecbe0ded: [OpenMP] `omp begin/end declare variant` - part 1, parsing (authored by jdoerfert). Herald added a subscriber: hiraditya. Changed prior to commit: https://reviews.llvm.org/D74941?vs=246630

[PATCH] D75788: [OpenMP] Provide math functions in OpenMP device code via OpenMP variants

2020-03-27 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 253153. jdoerfert added a comment. Add and repair tests to show new features, e.g. math macro support Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75788/new/ https://reviews.llvm.org/D75788 Files: clang/l

[PATCH] D75788: [OpenMP] Provide math functions in OpenMP device code via OpenMP variants

2020-03-27 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 253154. jdoerfert added a comment. Remove OpenMP from clang/lib/Headers/__clang_cuda_math_forward_declares.h Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75788/new/ https://reviews.llvm.org/D75788 Files:

[PATCH] D76211: OpenMP Metadirective with user defined condition

2020-03-29 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Apologies for my delay. In D76211#1940445 , @alokmishra.besu wrote: > Updated the test files It seems there is only an AST dump test case. Where is the codegen tests (and others)? Repository: rG LLVM Github Monorepo CHA

[PATCH] D76211: OpenMP Metadirective with user defined condition

2020-03-30 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:5801 +Expr *expr = whenClause->getExpr(); +Stmt *stmt = NULL; + Style: start names with upper case letter. Comment at: clang/lib/Sema/SemaOpenMP.cpp:5817 +

[PATCH] D74387: [SYCL] Defer __float128 type usage diagnostics

2020-03-30 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. This is needed for OpenMP as well. Does it make sense to include it in this patch or in another one? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74387/new/ https://reviews.llvm.org/D74387 ___

[PATCH] D77113: [OpenMP][NFC] Move and simplify directive -> allowed clause mapping

2020-03-30 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: lebedev.ri, JonChesterfield, ABataev. Herald added subscribers: jfb, guansong, bollu, hiraditya. Herald added a project: clang. jdoerfert added a reviewer: fghanim. Move the listing of allowed clauses per OpenMP directive to the new macro

[PATCH] D77112: [OpenMP][NFCI] Move OpenMP clause information to `lib/Frontend/OpenMP`

2020-03-31 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D77112#1953471 , @fghanim wrote: > Thanks for doing this. I looked at all of it, and the changes seem to be you > just moved things to llvm/Frontend, and fixed namespaces/includes to work > correctly with the new location. I

[PATCH] D77238: [CUDA][NFC] Split math.h functions out of __clang_cuda_device_functions.h

2020-04-01 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added a reviewer: tra. Herald added subscribers: bollu, yaxunl, mgorny. Herald added a project: clang. jdoerfert added a child revision: D77239: [CUDA][NFCI] Use unqualified lookup for math functions. This is not supported to change anything but allow us

[PATCH] D77239: [CUDA][NFCI] Use unqualified lookup for math functions

2020-04-01 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added a reviewer: tra. Herald added subscribers: bollu, yaxunl. Herald added a project: clang. jdoerfert added a child revision: D77240: [CUDA] Add missing cmath overloads. The other macro uses a unqualified lookup already and the qualified one will cause

[PATCH] D77240: [CUDA] Add missing cmath overloads

2020-04-01 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added a reviewer: tra. Herald added subscribers: bollu, yaxunl. Herald added a project: clang. Some function overloads for floats were missing, found by running a test suite [0] with the OpenMP overlay. [0] https://github.com/TApplencourt/OmpVal Depends

[PATCH] D77238: [CUDA][NFC] Split math.h functions out of __clang_cuda_device_functions.h

2020-04-01 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked an inline comment as done. jdoerfert added inline comments. Comment at: clang/lib/Headers/__clang_cuda_math.h:81 +#endif +__DEVICE__ long long clock64() { return __nvvm_read_ptx_sreg_clock64(); } +__DEVICE__ double copysign(double __a, double __b) { -

[PATCH] D77239: [CUDA][NFCI] Use unqualified lookup for math functions

2020-04-01 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert abandoned this revision. jdoerfert added a comment. In D77239#1955720 , @tra wrote: > > The other macro uses a unqualified lookup already and the qualified one > > will cause problems in the OpenMP overlay. > > There's a bit of inconsitency here

[PATCH] D77240: [CUDA] Add missing cmath overloads

2020-04-01 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D77240#1955678 , @tra wrote: > We'll need to make sure that all of these new functions are vailable in all > supported CUDA versions. > E.g. `acoshf` does not seem to be present in CUDA-9. At least that one is defined in w

[PATCH] D77240: [CUDA] Add missing cmath overloads

2020-04-01 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D77240#1955755 , @tra wrote: > In D77240#1955724 , @jdoerfert wrote: > > > At least that one is defined in what is "now" `__clang_cuda_math.h`: > > > Cool. We may be OK, but we still ne

[PATCH] D75788: [OpenMP] Provide math functions in OpenMP device code via OpenMP variants

2020-04-01 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 254375. jdoerfert added a comment. Herald added a subscriber: yaxunl. Rewrite. Wrap math.h, time.h, and cmath. Preload only device functions. Passes all 185 math c++11 tests from [0] which do not deal with long double. [0] https://github.com/TApplencourt/Om

[PATCH] D74935: [LangRef][AliasAnalysis] Clarify `noalias` affects only modified objects

2020-04-01 Thread Johannes Doerfert via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6cd673345cfa: [LangRef][AliasAnalysis] Clarify `noalias` affects only modified objects (authored by jdoerfert). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D76184: [OpenMP][NFC] Remove the need to include `OpenMPClause.h`

2020-04-01 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Herald added a subscriber: yaxunl. @rnk What is the plan for this one now? Should I abandon it? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76184/new/ https://reviews.llvm.org/D76184 _

[PATCH] D77238: [CUDA][NFC] Split math.h functions out of __clang_cuda_device_functions.h

2020-04-01 Thread Johannes Doerfert via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd1705c1196fe: [CUDA][NFC] Split math.h functions out of __clang_cuda_device_functions.h (authored by jdoerfert). Changed prior to commit: https://reviews.llvm.org/D77238?vs=254289&id=254426#toc Reposit

[PATCH] D77238: [CUDA][NFC] Split math.h functions out of __clang_cuda_device_functions.h

2020-04-01 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D77238#1956547 , @hliao wrote: > this patch breaks the test > clang/test/Headers/nvptx_device_cmath_functions.cpp, could you please fix it > ASAP? > Once NVPTX target is enabled, the following tests failed: > > Failing Test

[PATCH] D77112: [OpenMP][NFCI] Move OpenMP clause information to `lib/Frontend/OpenMP`

2020-04-02 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Herald added a subscriber: yaxunl. NOTE: I mixed this one up with the follow up that was approved already (D77113 ) and committed it. If it turns out to be problematic we revert but I'll leave it for now as there was a positive review

[PATCH] D77112: [OpenMP][NFCI] Move OpenMP clause information to `lib/Frontend/OpenMP`

2020-04-02 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Reverted in 1858f4b50dd35c28b377ba5dbc572fed43a5d38a as some uses need fixing, didn't build clang-tidy locally apparently. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:/

[PATCH] D77290: [OpenMP] Specialize OpenMP calls after template instantiation

2020-04-02 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim, aaron.ballman. Herald added subscribers: guansong, bollu, yaxunl. Herald added a project: clang. jdoerfert removed a parent rev

[PATCH] D77240: [CUDA] Add missing cmath overloads

2020-04-02 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. I just noticed those as well. I forgot to put the new definitions into the forward declare header. Will do it in a second. The OpenMP math overlay doesn't have one so I forgot :( Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D77240: [CUDA] Add missing cmath overloads

2020-04-02 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert abandoned this revision. jdoerfert added a comment. In D77240#1957468 , @tra wrote: > In D77240#1957386 , @jdoerfert wrote: > > > I just noticed those as well. I forgot to put the new definitions into the

[PATCH] D69868: Allow "callbr" to return non-void values

2020-02-18 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D69868#1881985 , @void wrote: > It's been almost a month since the last comments on this review. If you need > more time, please comment here. Otherwise, I will submit this with the > current approvals by the end of the week

[PATCH] D74562: [OpenMP][OMPIRBuilder] Introducing the `OMPBuilderCBHelpers` helper class

2020-02-19 Thread Johannes Doerfert via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGba3f863dfb9c: [OpenMP][OMPIRBuilder] Introducing the `OMPBuilderCBHelpers` helper class (authored by fghanim, committed by jdoerfert). Changed prior to commit: https://reviews.llvm.org/D74562?vs=245227

[PATCH] D74935: [LangRef][AliasAnalysis] Clarify `noalias` affects only modified objects

2020-02-20 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: hfinkel, nlopes, regehr, efriedma. Herald added a subscriber: bollu. Herald added a reviewer: sstefan1. Herald added a reviewer: uenoku. Herald added a project: LLVM. We already mention that `noalias` is modeled after the C99 `restrict` q

[PATCH] D74935: [LangRef][AliasAnalysis] Clarify `noalias` affects only modified objects

2020-02-20 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 245774. jdoerfert added a comment. Tried to simplify the wording by making it two sentences. @efriedma's wording is another option. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74935/new/ https://reviews.ll

[PATCH] D74941: [OpenMP] `omp begin/end declare variant` - part 1, parsing

2020-02-20 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim. Herald added subscribers: llvm-commits, guansong, bollu, jholewinski. Herald added projects: clang, LLVM. This is the first pa

[PATCH] D74935: [LangRef][AliasAnalysis] Clarify `noalias` affects only modified objects

2020-02-20 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 245795. jdoerfert added a comment. Remove leftover word Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74935/new/ https://reviews.llvm.org/D74935 Files: llvm/docs/LangRef.rst Index: llvm/docs/LangRef.rst

[PATCH] D74941: [OpenMP] `omp begin/end declare variant` - part 1, parsing

2020-02-21 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D74941#1886403 , @kiranchandramohan wrote: > Will tests come in a later patch? I have tests, seems I forgot to add them. Will fix later today with the other things. Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D74941: [OpenMP] `omp begin/end declare variant` - part 1, parsing

2020-02-21 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked 2 inline comments as done. jdoerfert added inline comments. Comment at: clang/lib/Parse/ParseOpenMP.cpp:1357-1359 + // Skip last tokens. + while (Tok.isNot(tok::annot_pragma_openmp_end)) +ConsumeAnyToken(); ABataev wrote: > Better to emit a

[PATCH] D74941: [OpenMP] `omp begin/end declare variant` - part 1, parsing

2020-02-21 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked 6 inline comments as done. jdoerfert added a comment. In D74941#1887367 , @fpetrogalli wrote: > 1. I am not familiar with `OpenMP technical report 8 (TR8)`. Could you please > provide a link in the description? Same for PR42061, PR42798,

[PATCH] D74941: [OpenMP] `omp begin/end declare variant` - part 1, parsing

2020-02-21 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked an inline comment as done. jdoerfert added inline comments. Comment at: clang/test/OpenMP/begin-declare-variant_elided_range_withouth_end.c:5 +// TODO: Improve the error message +#pragma omp begin declare variant match(device={kind(cpu)}) // expected-error {{un

<    7   8   9   10   11   12   13   14   15   16   >