[PATCH] D118495: [OpenMP] Accept shortened triples for -Xopenmp-target=

2022-01-28 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. and test pls Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118495/new/ https://reviews.llvm.org/D118495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[PATCH] D118493: [WIP]Set rpath on openmp executables

2022-01-28 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Can we test this somehow? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118493/new/ https://reviews.llvm.org/D118493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[PATCH] D118495: [OpenMP] Accept shortened triples for -Xopenmp-target=

2022-01-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 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118495/new/ https://reviews.llvm.org/D118495 ___

[PATCH] D116545: [OpenMP] Add support for extracting device code in linker wrapper

2022-01-31 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Can we test this, or is it tested with a follow up commit at least? If so, which one (add to commit message as well, e.g., tests contained in D...). Some notes, exclusively on the unused do not strip flag. Everything else looks good reading it. Comm

[PATCH] D116545: [OpenMP] Add support for extracting device code in linker wrapper

2022-01-31 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. what commit contains the tests? Comment at: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp:435 +Arg = **NewFileOrErr; + } +} jhuber6 wrote: > jdoerfert wrote: > > Does this work with the "do not strip option"

[PATCH] D116627: [Clang] Initial support for linking offloading code in tool

2022-01-31 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Same as the other commit, where is this tested? Comment at: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp:425 + ErrorOr NvlinkPath = sys::findProgramByName( + "nvlink", sys::path::parent_path(LinkerExecutable)); + if (!NvlinkPath) ---

[PATCH] D116675: [OpenMP] Search for static libraries in offload linker tool

2022-01-31 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: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp:646 +if (Arg.startswith("-L")) + LibraryPaths.push_back(Arg.drop_front(2)); + -

[PATCH] D116545: [OpenMP] Add support for extracting device code in linker wrapper

2022-01-31 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, as part of the patch set, and given the runtime test for coverage. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116545/new/ https://r

[PATCH] D116627: [Clang] Initial support for linking offloading code in tool

2022-01-31 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, as part of the patch set, and given the runtime test for coverage. Some nits are left for later though. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

[PATCH] D116975: [OpenMP] Initial Implementation of LTO and bitcode linking in linker wrapper

2022-01-31 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, as part of the patch set, and given the runtime test for coverage. Some nits. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:8154 +for (auto TI = OpenMPTCRa

[PATCH] D118708: [OpenMP] Add kernel string attribute to kernel function

2022-02-01 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, thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118708/new/ https://reviews.llvm.org/D118708 ___

[PATCH] D113359: [Libomptarget][WIP] Introduce VGPU Plugin

2022-02-02 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:3082 + if (getTriple().getVendor() == llvm::Triple::OpenMP_VGPU) { +std::string BitcodeSuffix = "x86_64-vgpu"; +clang::driver::tools::addOpenMPDeviceRTL(getDriver(), DriverArgs, CC1Args, ---

[PATCH] D116637: [Clang][Sema][OpenMP] Sema support for `atomic compare`

2022-02-02 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D116637#3284823 , @tianshilei1992 wrote: > In D116637#3284773 , @ABataev wrote: > >> sema and parsing tests? > > Tests will be in the patch for code gen. sema and parsing tests are

[PATCH] D118632: [WIP][Clang]OpenMP] Add the codegen support for `atomic compare`

2022-02-02 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:6023 + // llvm::OpenMPIRBuilder::InsertPointTy AllocaIP( + // CGF.AllocaInsertPt->getParent(), CGF.AllocaInsertPt->getIterator()); + leftover Comment at: clan

[PATCH] D120106: [OpenMP] Add flag for disabling threat state in runtime

2022-02-17 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. I'd go with `config::mayRequireThreadSpecificState` or sth. Also some documentation there. you should be able to use assertions, like `ASSERT(false && "")`. Which gives us messages in assert mode if violated. Clang documentation should be something like `no thread

[PATCH] D120106: [OpenMP] Add flag for disabling threat state in runtime

2022-02-17 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. Last nit, otherwise LG Comment at: openmp/libomptarget/DeviceRTL/src/State.cpp:385 + if (!config::mayUseThreadStates()) +ASSERT(false && "Thread state modified whi

[PATCH] D109239: Add support for floating-option `-ffp-eval-method` and for new `pragma clang fp eval-method`

2022-02-18 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. FWIW, https://github.com/llvm/llvm-project/issues/53931 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109239/new/ https://reviews.llvm.org/D109239 ___ cfe-commits mailing list

[PATCH] D120270: [OpenMP] Try to embed offloading objects after codegen

2022-02-21 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Can we have a test for this? Comment at: clang/include/clang/CodeGen/BackendUtil.h:48 - void EmbedObject(llvm::Module *M, const CodeGenOptions &CGOpts, DiagnosticsEngine &Diags); Seems unrelated, please remove i

[PATCH] D120271: [Clang] Add offload kind to embedded offload object

2022-02-21 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. The failing test needs to be adjusted, right? Comment at: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp:187 +return LHS.OffloadKind == RHS.OffloadKind && + LHS.TheTriple == RHS.TheTriple && LHS.Arch == RHS.Arch; + } --

[PATCH] D120272: [CUDA] Add driver support for compiling CUDA with the new driver

2022-02-21 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Tests? Comment at: clang/lib/Driver/Driver.cpp:3956 LA = C.MakeAction(LinkerInputs, types::TY_Image); - LA->propagateHostOffloadInfo(OffloadKinds, + LA->propagateHostOffloadInfo(C.getActiveOffloadKinds(),

[PATCH] D120270: [OpenMP] Try to embed offloading objects after codegen

2022-02-21 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, wait for the other patches though. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120270/new/ https://reviews.llvm.org/D120270 ___

[PATCH] D120934: [OpenMP][NFC] Refactor new driver to be more general

2022-03-04 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/D120934/new/ https://reviews.llvm.org/D120934 ___

[PATCH] D120288: [OpenMP] Implement dense map info for device file

2022-03-04 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. Herald added a project: All. LG Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120288/new/ https://reviews.llvm.org/D120288 __

[PATCH] D120271: [Clang] Add offload kind to embedded offload object

2022-03-04 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Herald added a project: All. @saiislam Ok to postpone the bundle entry usage to a follow up? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120271/new/ https://reviews.llvm.org/D120271

[PATCH] D121061: [OpenMPIRBuilder] Allocate temporary at the correct block in a nested parallel

2022-03-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, two nits. Comment at: llvm/include/llvm/Transforms/Utils/CodeExtractor.h:127 /// extraction of blocks containing alloca instructions would be possible, //

[PATCH] D120949: [clang][AST matchers] adding attributedStmt AST matcher

2022-03-07 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:2713-2714 +/// \endcode +extern const internal::VariadicDynCastAllOfMatcher +attributedStmt; + aaron.ballman wrote: > Design-wise, I'm on the fence here. AST matchers m

[PATCH] D91054: [Clang][OpenMP] Frontend work for sections - D89671

2021-04-22 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. What is missing or not working in the IRBuilder impl that prevents us from turning it on by default? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91054/new/ https://reviews.llvm.org/D91054 _

[PATCH] D101030: [OpenMP] Overhaul `declare target` handling

2021-04-22 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked an inline comment as done. jdoerfert added a comment. In D101030#2708277 , @ABataev wrote: > Could you check that it does not break the tests from > https://github.com/clang-ykt/omptests? IIRC, "ref" was introduced to fix a > bug with t

[PATCH] D101030: [OpenMP] Overhaul `declare target` handling

2021-04-22 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked an inline comment as done. jdoerfert added inline comments. Comment at: clang/lib/Parse/ParseOpenMP.cpp:2134-2151 +Sema::DeclareTargetContextInfo *DTCI = +new Sema::DeclareTargetContextInfo(DKind, DTLoc); +if (HasClauses) + ParseOMPDeclareTar

[PATCH] D91054: [Clang][OpenMP] Frontend work for sections - D89671

2021-04-22 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D91054#2708924 , @AMDChirag wrote: > In D91054#2708873 , @jdoerfert wrote: > >> What is missing or not working in the IRBuilder impl that prevents us from >> turning it on by default?

[PATCH] D101030: [OpenMP] Overhaul `declare target` handling

2021-04-23 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/lib/Parse/ParseOpenMP.cpp:2134-2151 +Sema::DeclareTargetContextInfo *DTCI = +new Sema::DeclareTargetContextInfo(DKind, DTLoc); +if (HasClauses) + ParseOMPDeclareTargetClauses(*DTCI); // Skip the last a

[PATCH] D100929: [Clang] Allow the combination of loader_uninitialized and address spaces

2021-04-23 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 340071. jdoerfert added a comment. Fix test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100929/new/ https://reviews.llvm.org/D100929 Files: clang/lib/Sema/SemaDecl.cpp clang/test/CodeGen/attr-loader-un

[PATCH] D100929: [Clang] Allow the combination of loader_uninitialized and address spaces

2021-04-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 rGcbe8b57a6755: [Clang] Allow the combination of loader_uninitialized and address spaces (authored by jdoerfert). Repository: rG LLVM Github Monorep

[PATCH] D101030: [OpenMP] Overhaul `declare target` handling

2021-04-23 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked 2 inline comments as done. jdoerfert added a comment. I'm testing a new version that does not allocate the structure on the heap. Instead we copy it. It is really infrequent and it should be <40 bytes when that happens, let's not over-optimize ;) Repository: rG LLVM Github M

[PATCH] D101030: [OpenMP] Overhaul `declare target` handling

2021-04-23 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 340126. jdoerfert added a comment. Avoid heap memory, copy when necessary, add documentation, address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101030/new/ https://reviews.llvm.org/D101030 Files

[PATCH] D101030: [OpenMP] Overhaul `declare target` handling

2021-04-23 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D101030#2713117 , @ABataev wrote: > Looks good, but would be nice to check with sanitizers that there are no > uses-after-delete. There is no heap allocation anymore but I guess I could have messed up the stack stuff. I do

[PATCH] D101030: [OpenMP] Overhaul `declare target` handling

2021-04-23 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. I'm fixing the tests now, also realized that the `omp allocate` handling now always creates definitions, which is bad. I'll upload a new version soon, test case for this, which shows we also don't do a good job now, is here: https://godbolt.org/z/T9od5Mq7h Repository

[PATCH] D100673: [OPENMP]Fix PR49698: OpenMP declare mapper causes segmentation fault.

2021-04-23 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. I think this broke GridMini (https://github.com/meifeng/GridMini/tree/openmp) :( Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100673/new/ https://reviews.llvm.org/D100673 ___

[PATCH] D100673: [OPENMP]Fix PR49698: OpenMP declare mapper causes segmentation fault.

2021-04-26 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D100673#2716916 , @ABataev wrote: > In D100673#2714087 , @jdoerfert > wrote: > >> I think this broke GridMini >> (https://github.com/meifeng/GridMini/tree/openmp) :( > > Hmm, this a

[PATCH] D100226: [funcattrs] Add the maximal set of implied attributes to definitions

2021-04-27 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: llvm/test/Transforms/FunctionAttrs/2008-09-03-ReadOnly.ll:14-15 -; CHECK: attributes #0 = { readonly } +; CHECK: attributes #0 = { nofree readonly } +; CHECK: attributes #1 = { readonly } thopre wrote: > I'm getting

[PATCH] D99762: [OPENMP]Fix PR49777: Clang should not try to specialize orphaned directives in device codegen.

2021-04-27 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. The bug has been fixed by D95976 already, I'll update the bug report now. Also, the tracking of Generic/SPMD mode in clang is about to be finally removed, new code depending on that is short-lived. Repository: rG LLVM Github Monore

[PATCH] D99530: [OPENMP]Fix PR49098: respect firstprivate of declare target variable.

2021-04-27 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/D99530/new/ https://reviews.llvm.org/D99530 _

[PATCH] D99350: [OPENMP]Fix PR49649: The introduction of $ref globals is not always valid.

2021-04-27 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. The cast was never the problem but the fact that the `$ref` lives in the global address space while the global value might be in the shared one. D101030 gives a way out here by not creating `$ref` variables if there is no host version

[PATCH] D91054: [Clang][OpenMP] Frontend work for sections - D89671

2021-04-27 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 D91054#2711654 , @fghanim wrote: >> This is generally fine with me, @fghanim @Meinersbur any concerns? > > I have none. All good for me Then L

[PATCH] D101503: [OpenMPIRBuilder] Add createOffloadMaptypes and createOffloadMapnames functions

2021-04-30 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. I assume clang tests apply here. It replaces clang functionality after all. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101503/new/ https://reviews.llvm.org/D101503 ___ cfe-c

[PATCH] D101739: [OpenMP] Fix non-determinism in clang task codegen

2021-05-03 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/D101739/new/ https://reviews.llvm.org/D101739 ___

[PATCH] D101030: [OpenMP] Overhaul `declare target` handling

2021-05-03 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 342419. jdoerfert added a comment. Fix tests by not always emitting a definition for omp allocate Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101030/new/ https://reviews.llvm.org/D101030 Files: clang/inc

[PATCH] D100620: [OpenMP] Make sure classes work on the device as they do on the host

2021-05-03 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 342433. jdoerfert marked an inline comment as done. jdoerfert added a comment. Herald added a subscriber: mgorny. Avoid including by not wrapping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100620/new/ ht

[PATCH] D101030: [OpenMP] Overhaul `declare target` handling

2021-05-03 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/lib/CodeGen/CGDecl.cpp:2618 +void CodeGenModule::EmitOMPAllocateDecl(const OMPAllocateDecl *D) { + for (Expr *E : const_cast(D)->varlists()) { +auto *DE = cast(E); ABataev wrote: > Why need to remove constan

[PATCH] D100620: [OpenMP] Make sure classes work on the device as they do on the host

2021-05-03 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D100620#2733707 , @JonChesterfield wrote: > We might want a test that includes along with this header, to check > they don't conflict with one another For that I need to replicate the potentially conflicting `` stuff in t

[PATCH] D101030: [OpenMP] Overhaul `declare target` handling

2021-05-03 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/lib/CodeGen/CGDecl.cpp:2618 +void CodeGenModule::EmitOMPAllocateDecl(const OMPAllocateDecl *D) { + for (Expr *E : const_cast(D)->varlists()) { +auto *DE = cast(E); ABataev wrote: > jdoerfert wrote: > > ABata

[PATCH] D101683: [Utils] Run non-filecheck runlines in-order in update_cc_test_checks

2021-05-03 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. Add a commit message explaining why/what this does. I run into the problem before so I know but other won't. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://r

[PATCH] D101800: [OpenMP] Fix non-determinism in clang task codegen (lastprivates)

2021-05-03 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/D101800/new/ https://reviews.llvm.org/D101800 ___

[PATCH] D101030: [OpenMP] Overhaul `declare target` handling

2021-05-03 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/lib/CodeGen/CGDecl.cpp:2618 +void CodeGenModule::EmitOMPAllocateDecl(const OMPAllocateDecl *D) { + for (Expr *E : const_cast(D)->varlists()) { +auto *DE = cast(E); ABataev wrote: > jdoerfert wrote: > > ABata

[PATCH] D101030: [OpenMP] Overhaul `declare target` handling

2021-05-04 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/lib/CodeGen/CGDecl.cpp:2618 +void CodeGenModule::EmitOMPAllocateDecl(const OMPAllocateDecl *D) { + for (Expr *E : const_cast(D)->varlists()) { +auto *DE = cast(E); ABataev wrote: > jdoerfert wrote: > > ABata

[PATCH] D101030: [OpenMP] Overhaul `declare target` handling

2021-05-04 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 342764. jdoerfert added a comment. Use mutateType, add test for static variable in function with allocate directive Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101030/new/ https://reviews.llvm.org/D101030

[PATCH] D101030: [OpenMP] Overhaul `declare target` handling

2021-05-04 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 342765. jdoerfert marked 4 inline comments as done. jdoerfert added a comment. Remove const cast, clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101030/new/ https://reviews.llvm.org/D101030 Files

[PATCH] D101030: [OpenMP] Overhaul `declare target` handling

2021-05-04 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked 7 inline comments as done. jdoerfert added inline comments. Comment at: clang/lib/CodeGen/CGDecl.cpp:2618 +void CodeGenModule::EmitOMPAllocateDecl(const OMPAllocateDecl *D) { + for (Expr *E : const_cast(D)->varlists()) { +auto *DE = cast(E);

[PATCH] D101030: [OpenMP] Overhaul `declare target` handling

2021-05-04 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a subscriber: ggeorgakoudis. jdoerfert added a comment. I'll wait for @ggeorgakoudis to update the tests with the script, then I'll adjust all clang tests again. FWIW, this also fixes an issue in OpenMC where declare target triggered this: llvm-project/clang/lib/CodeGen/CodeGe

[PATCH] D101849: [OpenMP][NFC] Refactor Clang OpenMP tests using update_cc_test_checks

2021-05-04 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, thanks for making this happen. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101849/new/ https://reviews.llvm.org/D101849 ___

[PATCH] D101901: [AMDGPU][OpenMP] Fix clang driver crash when provided -c

2021-05-05 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Cool, this makes sense :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101901/new/ https://reviews.llvm.org/D101901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[PATCH] D101934: [Utils][NFC] Rename replace-function-regex in update_cc_test_checks

2021-05-05 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/D101934/new/ https://reviews.llvm.org/D101934 ___

[PATCH] D101952: [OpenMP] Fix non-determinism in clang copyin codegen

2021-05-05 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. LGTM, two nits, one below. Add a sentence to the commit message describing the problem. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:1013 + Builder.Crea

[PATCH] D100620: [OpenMP] Make sure classes work on the device as they do on the host

2021-05-05 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 343279. jdoerfert marked an inline comment as done. jdoerfert added a comment. Split the new/delete operators based on std::nothrow_t and provide the ones that do not use this type by default, the others as part of . Repository: rG LLVM Github Monorepo

[PATCH] D101030: [OpenMP] Overhaul `declare target` handling

2021-05-05 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 343282. jdoerfert added a comment. Herald added a subscriber: jfb. Update tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101030/new/ https://reviews.llvm.org/D101030 Files: clang/include/clang/Basic/A

[PATCH] D101030: [OpenMP] Overhaul `declare target` handling

2021-05-05 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 343285. jdoerfert added a comment. Reapply test changes accidentally dropped Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101030/new/ https://reviews.llvm.org/D101030 Files: clang/include/clang/Basic/Attr

[PATCH] D101973: [OpenMP][NFC] Remove SIMD check lines for non-simd tests

2021-05-05 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: ABataev, ggeorgakoudis. Herald added subscribers: jfb, guansong, yaxunl. Herald added a reviewer: bollu. jdoerfert requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. If a tes

[PATCH] D101030: [OpenMP] Overhaul `declare target` handling

2021-05-05 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 343290. jdoerfert added a comment. Address the last test failures (all ordering) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101030/new/ https://reviews.llvm.org/D101030 Files: clang/include/clang/Basic/

[PATCH] D101976: [OpenMP] Unified entry point for SPMD & generic kernels in the device RTL

2021-05-06 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: ABataev, JonChesterfield, ggeorgakoudis, tianshilei1992. Herald added subscribers: jfb, guansong, hiraditya, yaxunl. Herald added a reviewer: bollu. jdoerfert requested review of this revision. Herald added subscribers: llvm-commits, cfe-

[PATCH] D101976: [OpenMP] Unified entry point for SPMD & generic kernels in the device RTL

2021-05-06 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. NOTE: not all tests have been updated, only *codegen.cpp ones. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101976/new/ https://reviews.llvm.org/D101976 ___ cfe-commits mailin

[PATCH] D101976: [OpenMP] Unified entry point for SPMD & generic kernels in the device RTL

2021-05-06 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 343301. jdoerfert added a comment. Remove itantium mangle change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101976/new/ https://reviews.llvm.org/D101976 Files: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp

[PATCH] D100620: [OpenMP] Make sure classes work on the device as they do on the host

2021-05-06 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 rG5d8d994dfbe3: [OpenMP] Make sure classes work on the device as they do on the host (authored by jdoerfert). Repository: rG LLVM Github Monorepo C

[PATCH] D100621: [OpenMP] Ensure the DefaultMapperId has a location

2021-05-06 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 rG3f1459670009: [OpenMP] Ensure the DefaultMapperId has a location (authored by jdoerfert). Changed prior to commit: https://reviews.llvm.org/D10062

[PATCH] D101030: [OpenMP] Overhaul `declare target` handling

2021-05-06 Thread Johannes Doerfert via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdf729e2b82b3: [OpenMP] Overhaul `declare target` handling (authored by jdoerfert). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101030/new/ https://reviews

[PATCH] D59319: [OpenMP][Offloading][1/3] A generic and simple target region interface

2021-05-06 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert abandoned this revision. jdoerfert added a comment. Herald added a subscriber: yaxunl. Herald added a reviewer: bollu. replaced by D101976 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59319/new/ https:/

[PATCH] D101849: [OpenMP][NFC] Refactor Clang OpenMP tests using update_cc_test_checks

2021-05-06 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D101849#2741980 , @DavidSpickett wrote: > I've required X86 target for this test to get our bots green again. We can have that as a workaround sure. > Either way this seems like a bug given that clang usually doesn't requi

[PATCH] D101976: [OpenMP] Unified entry point for SPMD & generic kernels in the device RTL

2021-05-06 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.cu:65-68 + asm volatile("barrier.sync %0;" + : + : "r"(barrier) + : "memory"); ABataev wrote: > Why not `__syncthreads`? I

[PATCH] D101976: [OpenMP] Unified entry point for SPMD & generic kernels in the device RTL

2021-05-06 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D101976#2742166 , @JonChesterfield wrote: > What are the required semantics of the barrier operations? Amdgcn builds them > on shared memory, so probably needs a change to the corresponding target_impl > to match I have *

[PATCH] D101952: [OpenMP] Fix non-determinism in clang copyin codegen

2021-05-06 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D101952#2742237 , @DavidSpickett wrote: > Thanks! I'll test our Arm build and revert the requires once I've confirmed > it passes. This is not the fix you need. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D93525: [clang-offload-bundler] Add unbundling of archives containing bundled object files into device specific archives

2021-05-06 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Can we split this patch now and make progress? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93525/new/ https://reviews.llvm.org/D93525 ___ cfe-commits mailing list cfe-commits

[PATCH] D101976: [OpenMP] Unified entry point for SPMD & generic kernels in the device RTL

2021-05-06 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D101976#2742788 , @JonChesterfield wrote: > In D101976#2742188 , @jdoerfert > wrote: > >> In D101976#2742166 , >> @JonChesterfield wrote:

[PATCH] D101030: [OpenMP] Overhaul `declare target` handling

2021-05-07 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D101030#2745429 , @gregmiller wrote: > Hello, We are maintaining a downstream version of the monorepo based on the > LLVM main branch. We have not transitioned to the new PM yet. In a recent > attempt to merge the latest u

[PATCH] D101976: [OpenMP] Unified entry point for SPMD & generic kernels in the device RTL

2021-05-09 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D101976#2743470 , @JonChesterfield wrote: > In D101976#2742919 , @jdoerfert > wrote: > >> So what do you wnat me to change for this patch now? > > Equivalent change to amdgpu target

[PATCH] D101030: [OpenMP] Overhaul `declare target` handling

2021-05-09 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D101030#2746770 , @gregmiller wrote: > In D101030#2745513 , @jdoerfert > wrote: > >> In D101030#2745429 , @gregmiller >> wrote: >> >>> Hel

[PATCH] D116549: [OpenMP][Clang] Allow passing target features in ISA trait for metadirective clause

2022-01-03 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Can you make the test check for the diagnose message? Also, do we have a test to verify an isa trait is properly handled? Comment at: clang/lib/Parse/ParseOpenMP.cpp:2533 +std::function DiagUnknownTrait = [this, Loc]( +

[PATCH] D116549: [OpenMP][Clang] Allow passing target features in ISA trait for metadirective clause

2022-01-06 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/lib/Parse/ParseOpenMP.cpp:2533 +std::function DiagUnknownTrait = [this, Loc]( +StringRef ISATrait) {}; +TargetOMPContext OMPCtx(ASTContext, std::move(DiagUnknownTrai

[PATCH] D96248: [OpenMP][AMDGPU] Add support for linking libomptarget bitcode

2022-01-08 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert reopened this revision. jdoerfert added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Driver/Options.td:948 def libomptarget_nvptx_bc_path_EQ : Joined<["--"], "libomptarget-nvptx-bc-path=">, Group, HelpText<"Path

[PATCH] D116865: [OpenMP][FIX] Emit debug declares only if debug info is available

2022-01-08 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: ye-luo, JonChesterfield, jhuber6. Herald added subscribers: guansong, bollu, yaxunl. jdoerfert requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. The `EmitDeclareOfAutoVariab

[PATCH] D116865: [OpenMP][FIX] Emit debug declares only if debug info is available

2022-01-08 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 398358. jdoerfert added a comment. Clang format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116865/new/ https://reviews.llvm.org/D116865 Files: clang/lib/CodeGen/CGStmtOpenMP.cpp clang/test/OpenMP/debu

[PATCH] D116865: [OpenMP][FIX] Emit debug declares only if debug info is available

2022-01-08 Thread Johannes Doerfert via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG37639b72a17b: [OpenMP][FIX] Emit debug declares only if debug info is available (authored by jdoerfert). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116865

[PATCH] D116906: [OpenMP][AMDGPU] Optimize the linked in math libraries

2022-01-09 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: JonChesterfield, jhuber6, ye-luo. Herald added subscribers: kerbowa, guansong, bollu, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl. jdoerfert requested review of this revision. Herald added subscribers: cfe-commits, sstefan1

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

2022-01-09 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: jhuber6, tianshilei1992, JonChesterfield. Herald added subscribers: asavonic, guansong, bollu, yaxunl, jvesely. jdoerfert requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. S

[PATCH] D113140: [OpenMP][NFCI] Introduce the kernel environment for target regions

2022-01-09 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert abandoned this revision. jdoerfert added a comment. Split up, main content starts with D116908 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113140/new/ https://reviews.llvm.org/D113140 ___

[PATCH] D116906: [OpenMP][AMDGPU] Optimize the linked in math libraries

2022-01-09 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. This fixes/hides the last remaining OvO failures with upstream on an AMD MI100 compiled with -O3. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116906/new/ https://reviews.llvm.org/D116906 __

[PATCH] D116549: [OpenMP][Clang] Allow passing target features in ISA trait for metadirective clause

2022-01-10 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/lib/Parse/ParseOpenMP.cpp:2533 +std::function DiagUnknownTrait = [this, Loc]( +StringRef ISATrait) {}; +TargetOMPContext OMPCtx(ASTContext, std::move(DiagUnknownTrai

[PATCH] D113359: [Libomptarget][WIP] Introduce VGPU Plugin

2022-01-10 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: llvm/lib/Support/Triple.cpp:512 + .Case("oe", Triple::OpenEmbedded) + .Case("vgpu", Triple::OpenMP_VGPU) + .Default(Triple::UnknownVendor); Comment at: openmp/libomptarget/DeviceRTL/s

[PATCH] D116549: [OpenMP][Clang] Allow passing target features in ISA trait for metadirective clause

2022-01-10 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/lib/Parse/ParseOpenMP.cpp:2533 +std::function DiagUnknownTrait = [this, Loc]( +StringRef ISATrait) {}; +TargetOMPContext OMPCtx(ASTContext, std::move(DiagUnknownTrai

[PATCH] D116549: [OpenMP][Clang] Allow passing target features in ISA trait for metadirective clause

2022-01-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, thanks for the adjustment. Hope you are happy with the result. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116549/new/ https://revie

[PATCH] D115378: OpenMP: Avoid using SmallVector::set_size()

2021-12-08 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/D115378/new/ https://reviews.llvm.org/D115378 ___

[PATCH] D115561: [Clang][OpenMP] Add the support for atomic compare in parser

2021-12-13 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. All good but parser tests needed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115561/new/ https://reviews.llvm.org/D115561 ___ cfe-commits mailing list cfe-commits@lists.llvm

<    12   13   14   15   16   17   18   19   >