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

2021-12-10 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 393634. tianshilei1992 added a comment. continue to remove more unrelated code changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115561/new/ https://reviews.llvm.org/D115561 Files: clang/include/c

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

2021-12-10 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 393656. tianshilei1992 added a comment. rebase and remove unnecessary changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115561/new/ https://reviews.llvm.org/D115561 Files: clang/include/clang/AST/

[PATCH] D115573: [Clang][OpenMP] Return error ahead of time if there are multiple mutex clauses in atomic directive

2021-12-10 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 created this revision. tianshilei1992 added reviewers: jdoerfert, ABataev. Herald added subscribers: guansong, yaxunl. tianshilei1992 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. Currently if there are multiple mu

[PATCH] D115573: [Clang][OpenMP] Return error ahead of time if there are multiple mutex clauses in atomic directive

2021-12-11 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 393702. tianshilei1992 added a comment. add another error return for memory order clauses Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115573/new/ https://reviews.llvm.org/D115573 Files: clang/lib/Se

[PATCH] D115586: [NFC][Clang][OpenMP] Use switch-case statement to process clauses of atomic directive

2021-12-11 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 created this revision. tianshilei1992 added reviewers: jdoerfert, ABataev. Herald added subscribers: guansong, yaxunl. tianshilei1992 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. This patch makes the process of cl

[PATCH] D115586: [NFC][Clang][OpenMP] Use switch-case statement to process clauses of atomic directive

2021-12-11 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 393706. tianshilei1992 added a comment. add missing `break` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115586/new/ https://reviews.llvm.org/D115586 Files: clang/lib/Sema/SemaOpenMP.cpp Index: cla

[PATCH] D115586: [NFC][Clang][OpenMP] Use switch-case statement to process clauses of atomic directive

2021-12-13 Thread Shilei Tian 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 rG5c23acbc023f: [NFC][Clang][OpenMP] Use switch-case statement to process clauses of atomic… (authored by tianshilei1992). Repository: rG LLVM Githu

[PATCH] D115586: [NFC][Clang][OpenMP] Use switch-case statement to process clauses of atomic directive

2021-12-13 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 reopened this revision. tianshilei1992 added a comment. This revision is now accepted and ready to land. Reopen to resolve build error reported by build bolt. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115586/new/ https://reviews.

[PATCH] D115586: [NFC][Clang][OpenMP] Use switch-case statement to process clauses of atomic directive

2021-12-13 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 394050. tianshilei1992 added a comment. add all other clauses supported by `atomic` to fix assertion Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115586/new/ https://reviews.llvm.org/D115586 Files: c

[PATCH] D115586: [NFC][Clang][OpenMP] Use switch-case statement to process clauses of atomic directive

2021-12-13 Thread Shilei Tian 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 rGd762c3d905ba: [NFC][Clang][OpenMP] Use switch-case statement to process clauses of atomic… (authored by tianshilei1992). Repository: rG LLVM Githu

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

2021-12-14 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. In D115561#3190243 , @mikerice wrote: > Note you'll want to add a line to flang/lib/Semantics/check-omp-structure.cpp > for the new clause or the flang build will fail. > > CHECK_SIMPLE_CLAUSE(Compare, OMPC_compare) Thank

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

2021-12-14 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. In D115561#3189179 , @jdoerfert wrote: > All good but parser tests needed. Since we directly emit an error in Sema, I'm not sure if we can do the same thing as `clang/test/OpenMP/atomic_ast_print.cpp` because we can alway

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

2021-12-17 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 395207. tianshilei1992 added a comment. Herald added a project: Flang. update one test case and flang fix Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115561/new/ https://reviews.llvm.org/D115561 Files

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

2021-12-17 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 395208. tianshilei1992 added a comment. remove unexpected change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115561/new/ https://reviews.llvm.org/D115561 Files: clang/include/clang/AST/OpenMPClause.

[PATCH] D115998: [Clang] Add helper text to fopenmp_version_EQ to make it show in help menu

2021-12-18 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 created this revision. Herald added subscribers: dang, guansong, yaxunl. tianshilei1992 requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. For now if we check `clang --help`, it doesn

[PATCH] D115998: [Clang] Add helper text to fopenmp_version_EQ to make it show in help menu

2021-12-18 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 395313. tianshilei1992 added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115998/new/ https://reviews.llvm.org/D115998 Files: clang/include/clang/Driver/Options.td Index: clang/in

[PATCH] D115998: [Clang] Add helper text to fopenmp_version_EQ to make it show in help menu

2021-12-19 Thread Shilei Tian 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 rG0060060fef5d: [Clang] Add helper text to fopenmp_version_EQ to make it show in help menu (authored by tianshilei1992). Repository: rG LLVM Github

[PATCH] D115573: [Clang][OpenMP] Return error ahead of time if there are multiple mutex clauses in atomic directive

2021-12-20 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115573/new/ https://reviews.llvm.org/D115573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

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

2021-12-20 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 planned changes to this revision. tianshilei1992 added a comment. I think I'm going to build another patches on top of this one and land them altogether. In this way, I don't need to add any test in this patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D116068: [NFC][Clang] Move function implementation of `OpenMPAtomicUpdateChecker` into anonymous namespace

2021-12-20 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 created this revision. tianshilei1992 added reviewers: jdoerfert, ABataev. Herald added subscribers: guansong, yaxunl. tianshilei1992 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. Just to keep code consistent as `O

[PATCH] D115573: [Clang][OpenMP] Return error ahead of time if there are multiple mutex clauses in atomic directive

2021-12-20 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. Okay, I reached the same point as D115561 , that the compiler stops at the first position it encounters error, so all those mixed uses cannot be in the same test case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D115573: [Clang][OpenMP] Return error ahead of time if there are multiple mutex clauses in atomic directive

2021-12-22 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 abandoned this revision. tianshilei1992 added a comment. Abandon the change because of the trade off between the amount of changes and benefit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115573/new/ https://reviews.llvm.org/D1155

[PATCH] D116068: [NFC][Clang] Move function implementation of `OpenMPAtomicUpdateChecker` into anonymous namespace

2021-12-22 Thread Shilei Tian 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 rGa364e8f6adeb: [NFC][Clang] Move function implementation of `OpenMPAtomicUpdateChecker` into… (authored by tianshilei1992). Repository: rG LLVM Git

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

2021-12-22 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 395929. tianshilei1992 added a comment. just emit the error but not return Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115561/new/ https://reviews.llvm.org/D115561 Files: clang/include/clang/AST/Ope

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

2021-12-23 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 396122. tianshilei1992 added a comment. fix comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115561/new/ https://reviews.llvm.org/D115561 Files: clang/include/clang/AST/OpenMPClause.h clang/in

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

2021-12-23 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 marked 2 inline comments as done. tianshilei1992 added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:11398-11400 +// TODO: For now we emit an error here and in emitOMPAtomicExpr we ignore +// code gen. +Diag(Body->getBeginLoc(), diag::err_o

[PATCH] D116261: [WIP][Clang][OpenMP] Add support for compare capture in parser

2021-12-23 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 created this revision. tianshilei1992 added reviewers: jdoerfert, ABataev. Herald added subscribers: arphaman, guansong, yaxunl. tianshilei1992 requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, sstefan1. Herald added projects: clang, LLVM. This

[PATCH] D116261: [WIP][Clang][OpenMP] Add support for compare capture in parser

2021-12-23 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:10991 + EncounteredAtomicKinds.contains(OMPC_capture)) +AtomicKind = OMPC_compare_capture; // OpenMP 5.0, 2.17.7 atomic Construct, Restrictions This is the place where the

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

2021-12-24 Thread Shilei Tian via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. tianshilei1992 marked an inline comment as done. Closed by commit rGc7a589a2c4e2: [Clang][OpenMP] Add the support for atomic compare in parser (authored by tianshilei19

[PATCH] D116261: [WIP][Clang][OpenMP] Add support for compare capture in parser

2021-12-25 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 396199. tianshilei1992 added a comment. update test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116261/new/ https://reviews.llvm.org/D116261 Files: clang/include/clang/AST/OpenMPClause.h clan

[PATCH] D113126: [OpenMP][NFCI] Embed the source location string size in the ident_t

2021-12-28 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. In D113126#3122947 , @jdoerfert wrote: > In D113126#3122659 , > @tianshilei1992 wrote: > >> I'm not convinced. `std::strlen` can do the job. Can you explain more why >> need it? >

[PATCH] D113126: [OpenMP][NFCI] Embed the source location string size in the ident_t

2021-12-28 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 accepted this revision. tianshilei1992 added a comment. This revision is now accepted and ready to land. In D113126#3212033 , @jdoerfert wrote: > In D113126#3211935 , > @tianshilei1992 wrote: > >>

[PATCH] D98902: [Clang][OpenMP][NVPTX] Fixed failure in openmp-offload-gpu.c if the system has CUDA

2021-03-18 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 created this revision. Herald added subscribers: guansong, yaxunl. tianshilei1992 requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. https://lists.llvm.org/pipermail/openmp-dev/2021-M

[PATCH] D98902: [Clang][OpenMP][NVPTX] Fixed failure in openmp-offload-gpu.c if the system has CUDA

2021-03-18 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. In D98902#2635930 , @tra wrote: >> My question is, if DeviceOffloadingKind == Action::OFK_Cuda, and we use -S, >> do we also want to skip as well? > > I do not think so. Libdevice is needed to implement some libcalls that L

[PATCH] D98902: [Clang][OpenMP][NVPTX] Fixed failure in openmp-offload-gpu.c if the system has CUDA

2021-03-21 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. In D98902#2636308 , @jdoerfert wrote: > @tra, so you think we should not do this? The user will see a link error late > I assume, might be better. I think @tra 's point is we should not do that for CUDA code. This change o

[PATCH] D98902: [Clang][OpenMP][NVPTX] Fixed failure in openmp-offload-gpu.c if the system has CUDA

2021-04-09 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. Ping... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98902/new/ https://reviews.llvm.org/D98902 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[PATCH] D98902: [Clang][OpenMP][NVPTX] Fixed failure in openmp-offload-gpu.c if the system has CUDA

2021-04-13 Thread Shilei Tian 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 rG53d474abc92c: [Clang][OpenMP][NVPTX] Fixed failure in openmp-offload-gpu.c if the system has… (authored by tianshilei1992). Repository: rG LLVM Gi

[PATCH] D100507: [Clang][Docs] Claim the atomic compare

2021-04-14 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 created this revision. Herald added a subscriber: jfb. tianshilei1992 requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. I'm working on the implementation of OpenMP 5.1 feature `atomi

[PATCH] D100507: [Clang][Docs] Claim the atomic compare

2021-04-15 Thread Shilei Tian via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2a95cb5858f8: [Clang][Docs] Claim the atomic compare (authored by tianshilei1992). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100507/new/ https://reviews

[PATCH] D100768: [Clang][OpenMP] Remove the mandatory flush for capture for OpenMP 5.1

2021-04-19 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 created this revision. tianshilei1992 added reviewers: jdoerfert, ABataev. Herald added subscribers: jfb, guansong, yaxunl. tianshilei1992 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. In OpenMP 5.1, the required f

[PATCH] D89844: [Clang][OpenMP] Fixed an issue of segment fault when using target nowait

2021-01-05 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:9670 Info.MapTypesArray, Info.MappersArray, Info, - {/*ForEndTask=*/false, HasDependClauses}); +

[PATCH] D93038: [NFC] clang/test/openMP/target_codegen.cpp should not depend on ssa name

2021-01-07 Thread Shilei Tian via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG63b42a051456: [NFC] clang/test/openMP/target_codegen.cpp should not depend on ssa name (authored by jeroen.dobbelaere, committed by tianshilei1992). Herald added a project: clang. Herald added a subscribe

[PATCH] D94871: [Clang][OpenMP] Fixed an issue that clang crashed when compiling OpenMP program in device only mode without host IR

2021-01-16 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 created this revision. tianshilei1992 added reviewers: jdoerfert, ABataev, grokos. Herald added subscribers: guansong, yaxunl. tianshilei1992 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. D94745

[PATCH] D94871: [Clang][OpenMP] Fixed an issue that clang crashed when compiling OpenMP program in device only mode without host IR

2021-01-17 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 317235. tianshilei1992 added a comment. Also updated for `registerTargetRegionEntryInfo` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94871/new/ https://reviews.llvm.org/D94871 Files: clang/lib/CodeG

[PATCH] D94884: [Clang][OpenMP] Include header for CUDA builtin vars into OpenMP wrapper header

2021-01-17 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 created this revision. Herald added subscribers: guansong, yaxunl. tianshilei1992 requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. Current OpenMP wrapper header `__clang_openmp_devi

[PATCH] D94884: [Clang][OpenMP] Include header for CUDA builtin vars into OpenMP wrapper header

2021-01-17 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 317251. tianshilei1992 added a comment. Use macro `DEVICE` to control the attribute Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94884/new/ https://reviews.llvm.org/D94884 Files: clang/lib/Headers/__

[PATCH] D94884: [Clang][OpenMP] Include header for CUDA builtin vars into OpenMP wrapper header

2021-01-17 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. C is still broken as the header is written in C++ where a struct can have member functions, either static or not. Need to fix it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94884/new/ https://reviews.llvm.org/D94

[PATCH] D94884: [Clang][OpenMP] Include header for CUDA builtin vars into OpenMP wrapper header

2021-01-17 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 317255. tianshilei1992 added a comment. Fixed compilation in C mode Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94884/new/ https://reviews.llvm.org/D94884 Files: clang/lib/Headers/__clang_cuda_built

[PATCH] D94884: [Clang][OpenMP] Include header for CUDA builtin vars into OpenMP wrapper header

2021-01-17 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added inline comments. Comment at: clang/lib/Headers/__clang_cuda_builtin_vars.h:95 // uint3). This function is defined after we pull in vector_types.h. - __attribute__((device)) operator dim3() const; - __attribute__((device)) operator uint3() const; + DEVI

[PATCH] D94871: [Clang][OpenMP] Fixed an issue that clang crashed when compiling OpenMP program in device only mode without host IR

2021-01-17 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 317258. tianshilei1992 added a comment. Added a new test case for device only compilation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94871/new/ https://reviews.llvm.org/D94871 Files: clang/lib/Code

[PATCH] D94871: [Clang][OpenMP] Fixed an issue that clang crashed when compiling OpenMP program in device only mode without host IR

2021-01-18 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 marked 3 inline comments as done. tianshilei1992 added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:2944-2947 +// This could happen if the device compilation is invoked standalone. +if (!hasTargetRegionEntryInfo(DeviceID, FileID, Paren

[PATCH] D94871: [Clang][OpenMP] Fixed an issue that clang crashed when compiling OpenMP program in device only mode without host IR

2021-01-18 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 317443. tianshilei1992 added a comment. Fixed the test case and rebased Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94871/new/ https://reviews.llvm.org/D94871 Files: clang/lib/CodeGen/CGOpenMPRuntim

[PATCH] D94871: [Clang][OpenMP] Fixed an issue that clang crashed when compiling OpenMP program in device only mode without host IR

2021-01-18 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 317444. tianshilei1992 added a comment. Removed the useless assertion Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94871/new/ https://reviews.llvm.org/D94871 Files: clang/lib/CodeGen/CGOpenMPRuntime.

[PATCH] D94884: [Clang][OpenMP] Include header for CUDA builtin vars into OpenMP wrapper header

2021-01-18 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 317453. tianshilei1992 added a comment. Removed code for C that are still not supported Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94884/new/ https://reviews.llvm.org/D94884 Files: clang/lib/Header

[PATCH] D94884: [Clang][OpenMP] Include header for CUDA builtin vars into OpenMP wrapper header

2021-01-18 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 marked 3 inline comments as done. tianshilei1992 added inline comments. Comment at: clang/lib/Headers/__clang_cuda_builtin_vars.h:52 + property(get = __fetch_builtin_##NAME##_##FIELD)) unsigned int FIELD; +#endif jdoerfert wrote: > Why do we

[PATCH] D94871: [Clang][OpenMP] Fixed an issue that clang crashed when compiling OpenMP program in device only mode without host IR

2021-01-19 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:2944-2947 +// This could happen if the device compilation is invoked standalone. +if (!hasTargetRegionEntryInfo(DeviceID, FileID, ParentName, LineNum)) + initializeTargetRegionEnt

[PATCH] D94871: [Clang][OpenMP] Fixed an issue that clang crashed when compiling OpenMP program in device only mode without host IR

2021-01-19 Thread Shilei Tian via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG82e537a9d28a: [Clang][OpenMP] Fixed an issue that clang crashed when compiling OpenMP program… (authored by tianshilei1992). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[PATCH] D94871: [Clang][OpenMP] Fixed an issue that clang crashed when compiling OpenMP program in device only mode without host IR

2021-01-19 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 marked 6 inline comments as done. tianshilei1992 added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:2944-2947 +// This could happen if the device compilation is invoked standalone. +if (!hasTargetRegionEntryInfo(DeviceID, FileID, Paren

[PATCH] D94884: [Clang][OpenMP] Include header for CUDA builtin vars into OpenMP wrapper header

2021-01-19 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 317647. tianshilei1992 added a comment. Refined the patch to make it only work in C++ mode. In C mode everything is unchanged. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94884/new/ https://reviews.ll

[PATCH] D94884: [Clang][OpenMP] Include header for CUDA builtin vars into OpenMP wrapper header

2021-01-19 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 marked 2 inline comments as done. tianshilei1992 added inline comments. Comment at: clang/lib/Headers/__clang_cuda_builtin_vars.h:40 +#ifdef __cplusplus #define __CUDA_DEVICE_BUILTIN(FIELD, INTRINSIC) \ tra wrote:

[PATCH] D94884: [Clang][OpenMP] Include header for CUDA builtin vars into OpenMP wrapper header

2021-01-19 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 317664. tianshilei1992 added a comment. Renamed the macro and undef it after use Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94884/new/ https://reviews.llvm.org/D94884 Files: clang/lib/Headers/__cla

[PATCH] D94884: [Clang][OpenMP] Include header for CUDA builtin vars into OpenMP wrapper header

2021-01-19 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. In D94884#2508000 , @JonChesterfield wrote: > Note that a cuda-free openmp devicertl compilation doesn't require this > patch, or any other pieces of cuda headers. Yes, we can write all code with CUDA built-in or others i

[PATCH] D94884: [Clang][OpenMP] Include header for CUDA builtin vars into OpenMP wrapper header

2021-01-19 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 abandoned this revision. tianshilei1992 added a comment. Let's use LLVM intrinsics for now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94884/new/ https://reviews.llvm.org/D94884 ___ cfe

[PATCH] D95089: [Clang][OpenMP] Use `clang_cc1` test for `declare_target_device_only_compilation.cpp`

2021-01-20 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 created this revision. tianshilei1992 added a reviewer: echristo. Herald added subscribers: guansong, yaxunl. tianshilei1992 requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. Use `cl

[PATCH] D95089: [Clang][OpenMP] Use `clang_cc1` test for `declare_target_device_only_compilation.cpp`

2021-01-20 Thread Shilei Tian via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3809e5dac965: [Clang][OpenMP] Use `clang_cc1` test for… (authored by tianshilei1992). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95089/new/ https://revie

[PATCH] D110286: [WIP][Clang][OpenMP] Add new clang argument `-fopenmp-target-simd`

2021-10-07 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. In D110286#3047943 , @JonChesterfield wrote: > I'm excited about the thread to warp mapping but unclear why this needs to be > a compile time flag. Can we use this mapping when pragma simd is present and > otherwise stay

[PATCH] D102449: [WIP][Clang][OpenMP] Add the support for compare clause in atomic directive

2021-08-22 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 368027. tianshilei1992 added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102449/new/ https://reviews.llvm.org/D102449 Files: clang/include/clang/AST/OpenMPClause.h clang/include/

[PATCH] D102449: [WIP][Clang][OpenMP] Add the support for compare clause in atomic directive

2021-08-23 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. In D102449#2960209 , @jdoerfert wrote: > Is this still WIP or should it be reviewed? Needs a proper commit message. Not yet. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D10

[PATCH] D102449: [WIP][Clang][OpenMP] Add the support for compare clause in atomic directive

2021-08-24 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 marked an inline comment as done. tianshilei1992 added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:5775-5802 +static void emitOMPAtomicCompareExpr(CodeGenFunction &CGF, + llvm::AtomicOrdering AO, const Expr *X

[PATCH] D108648: [Clang][OpenMP] Use enum to dereference children data array in OMPAtomicDirective

2021-08-24 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 created this revision. tianshilei1992 added reviewers: ABataev, jdoerfert. Herald added subscribers: guansong, yaxunl. tianshilei1992 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. Repository: rG LLVM Github Monor

[PATCH] D108648: [Clang][OpenMP] Use enum to dereference children data array in OMPAtomicDirective

2021-08-24 Thread Shilei Tian via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG148bc251f48e: [Clang][OpenMP] Use enum to dereference children data array in… (authored by tianshilei1992). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108

[PATCH] D102449: [WIP][Clang][OpenMP] Add the support for compare clause in atomic directive

2021-08-24 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 planned changes to this revision. tianshilei1992 marked an inline comment as done. tianshilei1992 added a comment. I'm going to move code gen into `OMPIRBuilder`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102449/new/ https://revi

[PATCH] D102449: [WIP][Clang][OpenMP] Add the support for compare clause in atomic directive

2021-08-27 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. Yes, there are a couple of issues of implicit cast to be fixed. Current test is just a placeholder. I copied and pasted from the one for `update` clause and just replaced all `update`s with `compare`. I’m also working on that. Repository: rG LLVM Github Monore

[PATCH] D102449: [WIP][Clang][OpenMP] Add the support for compare clause in atomic directive

2021-08-27 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 369208. tianshilei1992 added a comment. 1. Ignore implicit cast in some cases. 2. Add the test case. What are still missing: 1. Code generation for floating point types. Question: 1. What atomic instruction(s) should we use for floating point types?

[PATCH] D109061: [openmp] No longer use LIBRARY_PATH to find devicertl

2021-09-01 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. I suppose it require users to add a command line argument every time they want to build a program? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109061/new/ https://reviews.llvm.org/D109061

[PATCH] D109061: [openmp] No longer use LIBRARY_PATH to find devicertl

2021-09-01 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. In D109061#2977690 , @JonChesterfield wrote: > Nope, works the same as it used to - looks relative to clang. However I think > it's broken some CI machines Well, it also breaks when OpenMP is built standalone. Reposito

[PATCH] D109061: [openmp] No longer use LIBRARY_PATH to find devicertl

2021-09-01 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. From my perspective, using `LIBRARY_PATH` to find bitcode library conforms with convention because the library is linked in a linkage during compilation time, where `LIBRARY_PATH` is used by the linker. If we don't want to mess up test results, the patch to force

[PATCH] D102449: [WIP][Clang][OpenMP] Add the support for compare clause in atomic directive

2021-09-01 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. Another thing is how we deal with a corner case. Say the OpenMP code is written in the following way: #pragma omp atomic compare x = e < x ? e : x; That's how OpenMP spec defines the atomic operation. `x` is always in "else statement" of a conditional stat

[PATCH] D109061: [openmp] No longer use LIBRARY_PATH to find devicertl

2021-09-01 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. In D109061#2977714 , @JonChesterfield wrote: > Using LIBRARY_PATH to find the bitcode is a reasonable interpretation of > LIBRARY_PATH but it's a disaster in terms of using clang on a system that has > LIBRARY_PATH point

[PATCH] D102449: [WIP][Clang][OpenMP] Add the support for compare clause in atomic directive

2021-09-01 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 370036. tianshilei1992 added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102449/new/ https://reviews.llvm.org/D102449 Files: clang/include/clang/AST/OpenMPClause.h clang/include/

[PATCH] D109061: [openmp] No longer use LIBRARY_PATH to find devicertl

2021-09-01 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. In order to tackle the issues, I think we can do it this way: put the clang default lib ahead of `LIBRARY_PATH`. This can make sure `clang` always uses the bitcode library that comes with it, and if it is not there, it also has the ability to find a potential one

[PATCH] D109061: [openmp] No longer use LIBRARY_PATH to find devicertl

2021-09-08 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. In D109061#2989363 , @JonChesterfield wrote: > @tianshilei1992 can we agree that the tests must point to a specific > deviceRTL, and not dig one out of LIBRARY_PATH? That can be factored out of > this patch to make the t

[PATCH] D109061: [openmp] No longer use LIBRARY_PATH to find devicertl

2021-09-08 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added inline comments. Comment at: clang/test/Driver/openmp-offload-gpu.c:153 -/// bitcode library and add it to the LIBRARY_PATH. -// RUN: env LIBRARY_PATH=%S/Inputs/libomptarget %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \ -// RUN: -Xop

[PATCH] D109061: [openmp] No longer use LIBRARY_PATH to find devicertl

2021-09-09 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added inline comments. Comment at: clang/test/Driver/openmp-offload-gpu.c:153 -/// bitcode library and add it to the LIBRARY_PATH. -// RUN: env LIBRARY_PATH=%S/Inputs/libomptarget %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \ -// RUN: -Xop

[PATCH] D109061: [openmp] No longer use LIBRARY_PATH to find devicertl

2021-09-09 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 accepted this revision. tianshilei1992 added a comment. This revision is now accepted and ready to land. LGTM. It's good to go if the test is green. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109061/new/ https://reviews.llvm.org/D

<    1   2   3   4   5   6