[PATCH] D60883: [OpenMP] Avoid emitting maps for target link variables when unified memory is used

2019-04-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:7956 +// If using unified memory, no need to do the mappings. +if (CGF.CGM.getOpenMPRuntime().hasUnifiedAddressingSupport()) + return; Hmm, what about regular declare target d

[PATCH] D60907: [OpenMP][WIP] Add math functions support in OpenMP offloading

2019-04-19 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Headers/__clang_openmp_math.h:14 +double __kmpc_pow(double, double); +double __kmpc_sin(double); + Also, versions for float and long double Comment at: lib/Headers/__clang_openmp_math.h:21 +// Defi

[PATCH] D60907: [OpenMP][WIP] Add math functions support in OpenMP offloading

2019-04-19 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Headers/__clang_openmp_math.h:2 + +#ifndef __CLANG_OMP_CMATH_H__ +#define __CLANG_OMP_CMATH_H__ Why `__CLANG_OMP_CMATH_H__`? Your file is `..._math.h`, not `..._cmath.h`. Plus, seems to me, you're missing standard h

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-04-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8021 + /// the extracted map clauses. + void generateAllInfoForMapper(MapBaseValuesArrayTy &BasePointers, +MapValuesArrayTy &Pointers, This code has too m

[PATCH] D60568: [OpenMP] Add support for registering requires directives with the runtime

2019-04-29 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:10362 +void CGOpenMPRuntime::emitFunctionProlog(CodeGenFunction &CGF, const Decl *D){ + if (const auto *FD = dyn_cast(D)) { Bad formatting. Comment at: lib/CodeGen/CG

[PATCH] D61399: [OpenMP][Clang] Support for target math functions

2019-05-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. I don't like this implementation. Seems to me, it breaks one of the OpenMP standard requirements: the program can be compiled without openmp support. I assume, that with this includes the program won't be able to be compiled without OpenMP support anymore because it may

[PATCH] D61399: [OpenMP][Clang] Support for target math functions

2019-05-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Moreover, I think this will cause troubles even in simple cases. Assume we have `target if(cond)` construct. In this case we will need to compile the target region for both, the device and the host. If the target region uses some device-specific math functions, it will

[PATCH] D61399: [OpenMP][Clang] Support for target math functions

2019-05-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D61399#1488299 , @hfinkel wrote: > In D61399#1488262 , @ABataev wrote: > > > I don't like this implementation. Seems to me, it breaks one of the OpenMP > > standard requirements: the pro

[PATCH] D61399: [OpenMP][Clang] Support for target math functions

2019-05-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D61399#1488329 , @hfinkel wrote: > In D61399#1488309 , @ABataev wrote: > > > In D61399#1488299 , @hfinkel wrote: > > > > > In D61399#1488262

[PATCH] D61399: [OpenMP][Clang] Support for target math functions

2019-05-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D61399#1488897 , @hfinkel wrote: > In D61399#1488366 , @ABataev wrote: > > > In D61399#1488329 , @hfinkel wrote: > > > > > In D61399#1488309

[PATCH] D61509: [PragmaHandler][OpenMP] Expose `#pragma` location

2019-05-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. If the patch is going to be accepted, then definitely it must be solution #1. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61509/new/ https://reviews.llvm.org/D61509 ___ cfe-c

[PATCH] D61399: [OpenMP][Clang] Support for target math functions

2019-05-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D61399#1489757 , @gtbercea wrote: > @ABataev this patch works for both C and C++ and for both math.h and cmath > headers. Did you test it for the builtins? like `pow`, `powf` and `powl`? How are the builtins resolved with th

[PATCH] D61509: [PragmaHandler][OpenMP] Expose `#pragma` location

2019-05-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D61509#1489761 , @jdenny wrote: > In D61509#1489752 , @ABataev wrote: > > > If the patch is going to be accepted, then definitely it must be solution > > #1. > > > I certainly have no ob

[PATCH] D61509: [PragmaHandler][OpenMP] Expose `#pragma` location

2019-05-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D61509#1489845 , @jdenny wrote: > In D61509#1489771 , @ABataev wrote: > > > In D61509#1489761 , @jdenny wrote: > > > > > In D61509#1489752

[PATCH] D61509: [PragmaHandler][OpenMP] Expose `#pragma` location

2019-05-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. The OpenMP part looks good. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61509/new/ https://reviews.llvm.org/D61509 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[PATCH] D61399: [OpenMP][Clang] Support for target math functions

2019-05-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D61399#1490189 , @hfinkel wrote: > > Still, I think we need to prvide the default implementation of those > > non-standard functions (they can be very simple, maybe reporting error is > > going to be enough), which can be over

[PATCH] D61522: Added an assertion to constant evaluation enty points that prohibits dependent expressions

2019-05-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:5784 Expr::EvalResult Result; -if (CollapseLoopCountExpr->EvaluateAsInt(Result, SemaRef.getASTContext())) +if (!CollapseLoopCountExpr->isValueDependent() && +!CollapseLoopCountExpr->isTy

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-05-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8021 + /// the extracted map clauses. + void generateAllInfoForMapper(MapBaseValuesArrayTy &BasePointers, +MapValuesArrayTy &Pointers, lildmh wrote: > ABa

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-05-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D59474#1490235 , @lildmh wrote: > Hi Alexey, > > Let's discuss your runtime data mapping scheme next week first. After that we > will continue the review of this. That would be good, thanks! Comment at: li

[PATCH] D61509: [PragmaHandler][OpenMP] Expose `#pragma` location

2019-05-05 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D61509#1491204 , @lebedev.ri wrote: > In D61509#1491158 , @jdenny wrote: > > > In D61509#1491119 , @lebedev.ri > > wrote: > > > > > I recommend t

[PATCH] D61509: [PragmaHandler][OpenMP] Expose `#pragma` location

2019-05-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D61509#1491397 , @jdenny wrote: > In D61509#1491209 , @ABataev wrote: > > > In D61509#1491204 , @lebedev.ri > > wrote: > > > > > In D61509#149115

[PATCH] D60568: [OpenMP] Add support for registering requires directives with the runtime

2019-05-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:10364 + if (const auto *FD = dyn_cast(D)) { +if (OMPDeclareTargetDeclAttr::isDeclareTargetDeclaration(FD)) { + HasEmittedDeclareTargetRegion = true; gtbercea wrote: > ABataev wro

[PATCH] D61399: [OpenMP][Clang] Support for target math functions

2019-05-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Headers/__clang_cuda_cmath.h:54 __DEVICE__ float fmod(float __x, float __y) { return ::fmodf(__x, __y); } +#ifndef _OPENMP __DEVICE__ int fpclassify(float __x) { Why we have this guard here? It does not work for Op

[PATCH] D61509: [PragmaHandler][OpenMP] Expose `#pragma` location

2019-05-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D61509#1491979 , @jdenny wrote: > In D61509#1491898 , @ABataev wrote: > > > Again, I don't see a single point why would we need this. I don't think > > there is a big difference between

[PATCH] D61399: [OpenMP][Clang] Support for target math functions

2019-05-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Headers/__clang_cuda_cmath.h:54 __DEVICE__ float fmod(float __x, float __y) { return ::fmodf(__x, __y); } +#ifndef _OPENMP __DEVICE__ int fpclassify(float __x) { gtbercea wrote: > ABataev wrote: > > Why we have thi

[PATCH] D61399: [OpenMP][Clang] Support for target math functions

2019-05-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Headers/__clang_cuda_cmath.h:444 using ::roundf; +#ifndef _OPENMP using ::scalblnf; I see that the same guard is used `lib/Headers/__clang_cuda_device_functions.h`, but for different set of functions. Is this ok?

[PATCH] D61399: [OpenMP][Clang] Support for target math functions

2019-05-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG with a nit. Comment at: lib/Headers/__clang_cuda_cmath.h:444 using ::roundf; +#ifndef _OPENMP using ::scalblnf; gtbercea wrote: > ABataev wrote: > > I

[PATCH] D61522: Added an assertion to constant evaluation enty points that prohibits dependent expressions

2019-05-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:5784 Expr::EvalResult Result; -if (CollapseLoopCountExpr->EvaluateAsInt(Result, SemaRef.getASTContext())) +if (!CollapseLoopCountExpr->isValueDependent() && +!CollapseLoopCountExpr->isTy

[PATCH] D52359: [OPENMP] Add support for OMP5 requires directive + unified_address clause

2018-09-21 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rC Clang https://reviews.llvm.org/D52359 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

[PATCH] D52434: [OpenMP] Make default schedules for NVPTX target regions in SPMD mode achieve coalescing

2018-09-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGStmtOpenMP.cpp:2304 + const auto *C = S.getSingleClause(); + if (C) { +// If schedule clause is present. Restore original code here Comment at: lib/CodeGen/CGStmtOpenMP.

[PATCH] D52434: [OpenMP] Make default schedules for NVPTX target regions in SPMD mode achieve coalescing

2018-09-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:9199 + OpenMPDistScheduleClauseKind *ScheduleKind, llvm::Value *&Chunk) const { + return; +} Remove `return;`, it is not required Comment at: lib/CodeGen/CGOpenMPR

[PATCH] D51686: [OpenMP] Improve search for libomptarget-nvptx

2018-09-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:515 + if (Arg *A = Args.getLastArg(options::OPT_libomptarget_nvptx_path_EQ)) +CmdArgs.push_back(Args.MakeArgString(Twine("-L") + A->getValue())); + `const Arg *A` Co

[PATCH] D51686: [OpenMP] Improve search for libomptarget-nvptx

2018-09-27 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG https://reviews.llvm.org/D51686 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D52434: [OpenMP] Make default schedules for NVPTX target regions in SPMD mode achieve coalescing

2018-09-27 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rC Clang https://reviews.llvm.org/D52434 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

[PATCH] D52625: [OPENMP] Add 'unified_shared_memory' clause to OMP5 'requires' directive

2018-09-27 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. I forgot to mention that you need an ast print test (the positive test) Repository: rC Clang https://reviews.llvm.org/D52625 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D52629: [OpenMP] Make default parallel for schedule in NVPTX target regions in SPMD mode achieve coalescing

2018-09-27 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp:4103 +ScheduleKind = OMPC_SCHEDULE_static; +Chunk = CGF.Builder.getIntN(CGM.getDataLayout().getTypeAllocSizeInBits( +CGF.ConvertType(S.getIterationVariable()->getType())), 1);

[PATCH] D52629: [OpenMP] Make default parallel for schedule in NVPTX target regions in SPMD mode achieve coalescing

2018-09-27 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rC Clang https://reviews.llvm.org/D52629 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

[PATCH] D52625: [OPENMP] Add 'unified_shared_memory' clause to OMP5 'requires' directive

2018-09-28 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG https://reviews.llvm.org/D52625 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D52731: [OpenMP] Simplify code for reductions on distribute directives, NFC.

2018-10-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rC Clang https://reviews.llvm.org/D52731 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

[PATCH] D52732: [OpenMP][NVPTX] Simplify codegen for orphaned parallel, NFCI.

2018-10-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rC Clang https://reviews.llvm.org/D52732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

[PATCH] D52733: [OpenMP][NVPTX] Avoid data sharing if in parallel region

2018-10-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. It might lead to increased register pressure, isn't it? Currently, I'm trying to emit the code that can be optimized out and, thus, may decrease the register pressure. That's why I tried to reduce the number of the runtime checks. Repository: rC Clang https://review

[PATCH] D52780: [OPENMP] Add 'reverse_offload' clause to OMP5.0 'requires' directive

2018-10-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rC Clang https://reviews.llvm.org/D52780 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

[PATCH] D52733: [OpenMP][NVPTX] Avoid data sharing if in parallel region

2018-10-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In https://reviews.llvm.org/D52733#1252963, @Hahnfeld wrote: > In https://reviews.llvm.org/D52733#1251421, @ABataev wrote: > > > It might lead to increased register pressure, isn't it? Currently, I'm > > trying to emit the code that can be optimized out and, thus, may de

[PATCH] D57576: Adding support to the OpenMP mutexinoutset dependency type

2019-02-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57576/new/ https://reviews.llvm.org/D57576 ___ cfe-commits ma

[PATCH] D56326: [OpenMP 5.0] Parsing/sema support for "omp declare mapper" directive

2019-02-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. Accepted, just was not marked as accepted for an unknown reason. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56326/new/ https://reviews.llvm.org/D56326

[PATCH] D57585: [AST][OpenMP] OpenMP Sections / Section constructs contain Structured blocks

2019-02-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57585/new/ https://reviews.llvm.org/D57585 ___ cfe-commits ma

[PATCH] D57162: [DEBUG_INFO][NVPTX] Generate correct data about variable address class.

2019-02-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D57162#1380795 , @probinson wrote: > LGTM. I'll trust you on the actual address-class values. Thanks, Paul! If you want, you can find those values in the table here https://docs.nvidia.com/cuda/archive/10.0/ptx-writers-guide-

[PATCH] D57594: [AST][OpenMP] OpenMP single Construct contains Structured block

2019-02-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57594/new/ https://reviews.llvm.org/D57594 ___ cfe-commits ma

[PATCH] D57615: [AST][OpenMP] OpenMP master Construct contains Structured block

2019-02-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Sema/SemaOpenMP.cpp:6058 + // longjmp() and throw() must not violate the entry/exit criteria. + cast(AStmt)->getCapturedDecl()->setNothrow(); + Generally speaking, this is not required. It is required only for thos

[PATCH] D57615: [AST][OpenMP] OpenMP master Construct contains Structured block

2019-02-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D57615#1381416 , @lebedev.ri wrote: > @ABataev i'm not sure i have fully followed the > https://bugs.llvm.org/show_bug.cgi?id=40563#c1 > > > The outlined function is not generated for the loop, so there is no problem > > with

[PATCH] D57615: [AST][OpenMP] OpenMP master Construct contains Structured block

2019-02-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D57615#1381427 , @lebedev.ri wrote: > In D57615#1381418 , @ABataev wrote: > > > In D57615#1381416 , @lebedev.ri > > wrote: > > > > > @ABataev i'm

[PATCH] D57615: [AST][OpenMP] OpenMP master Construct contains Structured block

2019-02-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. > Okay, enough is enough :) > I think a very important phrase was repeated a number of times, and it > highlights the **actual** problem here: > >> is not the representation of the structured block It is not a problem! It is the internal implementation design! What do

[PATCH] D57615: [AST][OpenMP] OpenMP master Construct contains Structured block

2019-02-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D57615#1381443 , @lebedev.ri wrote: > Let's instead solve the problem of structured block not having an AST > representation. Again, this is not a problem for the compiler. If you want this idiom for the analyzer, you need t

[PATCH] D57615: [AST][OpenMP] OpenMP master Construct contains Structured block

2019-02-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D57615#1381467 , @lebedev.ri wrote: > In D57615#1381447 , @ABataev wrote: > > > > Okay, enough is enough :) > > > I think a very important phrase was repeated a number of times, and it

[PATCH] D57690: [OPENMP] issue error messages for multiple teams contructs in a target constructs

2019-02-04 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:7070 const auto *OED = dyn_cast(*I); -if (!OED || !isOpenMPTeamsDirective(OED->getDirectiveKind())) { +if (!OED || !isOpenMPTeamsDirective(OED->getDirectiveKind()) || +(i

[PATCH] D57690: [OPENMP] issue error messages for multiple teams contructs in a target constructs

2019-02-04 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57690/new/ https://reviews.llvm.org/D57690 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D57162: [DEBUG_INFO][NVPTX] Generate correct data about variable address class.

2019-02-05 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC353204: [DEBUG_INFO][NVPTX] Generate correct data about variable address class. (authored by ABataev, committed by ). Changed prior to commit: https://reviews.llvm.org/D57162?vs=183325&id=185364#toc Re

[PATCH] D57768: [SYCL] Add SYCL device compilation flow.

2019-02-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev requested changes to this revision. ABataev added a comment. This revision now requires changes to proceed. This definitely requires a test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57768/new/ https://reviews.llvm.org/D57768 ___

[PATCH] D57768: [SYCL] Add SYCL device compilation flow.

2019-02-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D57768#1386933 , @bader wrote: > In D57768#1386924 , @ABataev wrote: > > > This definitely requires a test. > > > @ABataev, I tried to find some tests on similar `-fcuda-is-device` and >

[PATCH] D57908: [SEMA]Generalize deferred diagnostic interface, NFC.

2019-02-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added reviewers: rjmccall, tra. Herald added a project: clang. Deferred diagnostic interface is going to be used for OpenMP device compilation. Generalized previously existed deferred diagnostic interface for CUDA to be used with OpenMP and, possibly, other m

[PATCH] D57908: [SEMA]Generalize deferred diagnostic interface, NFC.

2019-02-07 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL353456: [SEMA]Generalize deferred diagnostic interface, NFC. (authored by ABataev, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SIN

[PATCH] D57768: [SYCL] Add SYCL device compilation flow.

2019-02-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D57768#1392975 , @bader wrote: > In D57768#1386941 , @ABataev wrote: > > > In D57768#1386933 , @bader wrote: > > > > > In D57768#1386924

[PATCH] D57984: PR40642: Fix determination of whether the final statement of a statementexpression is a discarded-value expression.

2019-02-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D57984#1394050 , @rsmith wrote: > @ABataev Is it intentional that we do not propagate `Allowed` through labels? > For example: > > void f() { > #pragma omp barrier // ok > > label: > #pragma omp barrier // error,

[PATCH] D57984: PR40642: Fix determination of whether the final statement of a statementexpression is a discarded-value expression.

2019-02-12 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Herald added a subscriber: jdoerfert. In D57984#1394167 , @rsmith wrote: > In D57984#1394067 , @ABataev wrote: > > > In D57984#1394050 , @rsmith wrot

[PATCH] D58074: [OpenMP 5.0] Parsing/sema support for map clause with mapper modifier

2019-02-12 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Herald added a subscriber: jdoerfert. Also, need some kind of the stubbed codegen for the mapper Comment at: include/clang/AST/OpenMPClause.h:4236 + static OMPMapClause * + Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc

[PATCH] D58074: [OpenMP 5.0] Parsing/sema support for map clause with mapper modifier

2019-02-12 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D58074#1394993 , @lildmh wrote: > Hi Alexey, > > Thanks very much for your quick review! > > For the codegen, currently I'm thinking to do it within declare target > codegen functions. So there is not a very clear interface to

[PATCH] D58074: [OpenMP 5.0] Parsing/sema support for map clause with mapper modifier

2019-02-12 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Sema/SemaLookup.cpp:1074 + if (NameKind == LookupOMPMapperName) { +// Skip out-of-scope declarations. lildmh wrote: > ABataev wrote: > > lildmh wrote: > > > ABataev wrote: > > > > Why do we need special proces

[PATCH] D58074: [OpenMP 5.0] Parsing/sema support for map clause with mapper modifier

2019-02-12 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Sema/SemaLookup.cpp:1074 + if (NameKind == LookupOMPMapperName) { +// Skip out-of-scope declarations. lildmh wrote: > ABataev wrote: > > lildmh wrote: > > > ABataev wrote: > > > > lildmh wrote: > > > > > ABata

[PATCH] D58074: [OpenMP 5.0] Parsing/sema support for map clause with mapper modifier

2019-02-12 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Sema/SemaLookup.cpp:1074 + if (NameKind == LookupOMPMapperName) { +// Skip out-of-scope declarations. lildmh wrote: > ABataev wrote: > > lildmh wrote: > > > ABataev wrote: > > > > lildmh wrote: > > > > > ABata

[PATCH] D57984: PR40642: Fix determination of whether the final statement of a statementexpression is a discarded-value expression.

2019-02-13 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: include/clang/Parse/Parser.h:382 + + friend ParsedStmtContext operator|(ParsedStmtContext A, ParsedStmtContext B) { +return ParsedStmtContext((unsigned)A | (unsigned)B); We have `llvm/ADT/BitmaskEnum.h`, which defi

[PATCH] D58074: [OpenMP 5.0] Parsing/sema support for map clause with mapper modifier

2019-02-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Check, please, that adding this to the map clause does not crash the codegen. Would be good to ignore this construct in codegen for now, if it is used in the code. Comment at: include/clang/AST/OpenMPClause.h:4193 ArrayRef Map

[PATCH] D58243: [OPENMP] Delay emission of the asm target-specific error messages.

2019-02-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added a reviewer: rjmccall. Herald added subscribers: jdoerfert, guansong. Herald added a project: clang. Added the ability to emit target-specific builtin assembler error messages only in case if the function is really is going to be emitted for the device.

[PATCH] D58074: [OpenMP 5.0] Parsing/sema support for map clause with mapper modifier

2019-02-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D58074#1398187 , @lildmh wrote: > Hi Alexey, > > Again thanks for your review! The codegen completely ignores any mapper > related info for now, so it should not crash map clause codegen. It also > passed the regression test,

[PATCH] D58074: [OpenMP 5.0] Parsing/sema support for map clause with mapper modifier

2019-02-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: include/clang/AST/OpenMPClause.h:4193 ArrayRef MapModifiersLoc, +NestedNameSpecifierLoc MapperQualifierLoc, +DeclarationNameInfo MapperIdInfo, lild

[PATCH] D58074: [OpenMP 5.0] Parsing/sema support for map clause with mapper modifier

2019-02-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: include/clang/AST/OpenMPClause.h:3626 + struct OMPMappableExprListSizeTy { +unsigned NumVars; +unsigned NumUniqueDeclarations; Add default initializers for the fields Comment at: include/clang

[PATCH] D58074: [OpenMP 5.0] Parsing/sema support for map clause with mapper modifier

2019-02-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: include/clang/AST/OpenMPClause.h:3666 + OMPMappableExprListClause( + OpenMPClauseKind K, OMPMappableExprListLocTy Locs, + OMPMappableExprListSizeTy Sizes, Pass those new structures by const reference, not by v

[PATCH] D58074: [OpenMP 5.0] Parsing/sema support for map clause with mapper modifier

2019-02-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: include/clang/Sema/Sema.h:9347 ArrayRef MapTypeModifiersLoc, + CXXScopeSpec &MapperIdScopeSpec, DeclarationNameInfo &MapperId, OpenMPMapClauseKind MapType, bool IsMapTypeImplicit, ABataev wrote: > Also

[PATCH] D58074: [OpenMP 5.0] Parsing/sema support for map clause with mapper modifier

2019-02-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. In D58074#1399881 , @lildmh wrote: > Thanks for the catch! I also change the name from `OMPMappableExprListLocTy` > to `OMPVarListLocTy` to be more a

[PATCH] D58243: [OPENMP] Delay emission of the asm target-specific error messages.

2019-02-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Ping! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58243/new/ https://reviews.llvm.org/D58243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[PATCH] D58243: [OPENMP] Delay emission of the asm target-specific error messages.

2019-02-19 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev marked an inline comment as done. ABataev added inline comments. Comment at: lib/Sema/SemaStmtAsm.cpp:256-263 // If we're compiling CUDA file and function attributes indicate that it's not // for this compilation side, skip all the checks. if (!DeclAttrsMatchCUD

[PATCH] D58243: [OPENMP] Delay emission of the asm target-specific error messages.

2019-02-20 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL354486: [OPENMP] Delay emission of the asm target-specific error messages. (authored by ABataev, committed by ). Herald ad

[PATCH] D58463: [CUDA]Delayed diagnostics for the asm instructions.

2019-02-20 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added reviewers: tra, jlebar. Herald added a subscriber: jdoerfert. Herald added a project: clang. Adapted targetDiag for the CUDA and used for the delayed diagnostics in asm constructs. Works for both host and device compilation sides. Repository: rC Cla

[PATCH] D57768: [SYCL] Add clang front-end option to enable SYCL device compilation flow.

2019-02-21 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/test/Preprocessor/sycl-macro.cpp:1 +// RUN: %clang_cc1 %s -fsycl-is-device -E -dM | FileCheck %s + Add a test that without this option `__SYCL_DEVICE_ONLY__` is not defined Repository: rG LLVM Github Monorepo

[PATCH] D57768: [SYCL] Add clang front-end option to enable SYCL device compilation flow.

2019-02-21 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev 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/D57768/new/ https://reviews.llvm.org/D57768 ___

[PATCH] D58504: [OpenCL][8.0.0 Release] Notes for OpenCL

2019-02-21 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: docs/ReleaseNotes.rst:14 -This document contains the release notes for the Clang C/C++/Objective-C +This document contains the release notes for the Clang C/C++/Objective-C/OpenCL frontend, part of the LLVM Compiler Infrastructure, re

[PATCH] D58463: [CUDA]Delayed diagnostics for the asm instructions.

2019-02-21 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL354593: [CUDA]Delayed diagnostics for the asm instructions. (authored by ABataev, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://

[PATCH] D58523: [OpenMP 5.0] Parsing/sema support for to and from clauses with mapper modifier

2019-02-21 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: include/clang/Basic/OpenMPKinds.def:585 +// Modifiers for 'to' and 'from' clause. +OPENMP_TO_FROM_MODIFIER_KIND(mapper) + Maybe, better to split it. There must be separate modifiers for `from` clause and for `to` clause

[PATCH] D58523: [OpenMP 5.0] Parsing/sema support for to and from clauses with mapper modifier

2019-02-22 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/AST/OpenMPClause.cpp:1469 void OMPClausePrinter::VisitOMPFromClause(OMPFromClause *Node) { if (!Node->varlist_empty()) { lildmh wrote: > ABataev wrote: > > Better to split this patch into 2: one for `to` clause

[PATCH] D58523: [OpenMP 5.0] Parsing/sema support for to clause with mapper modifier

2019-02-22 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Sema/SemaOpenMP.cpp:13195 - } else { -MVLI.UDMapperList.push_back(nullptr); } Is this correct for `from` clause? Comment at: lib/Sema/SemaOpenMP.cpp:13237 - } else { -

[PATCH] D58523: [OpenMP 5.0] Parsing/sema support for to clause with mapper modifier

2019-02-22 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58523/new/ https://reviews.llvm.org/D58523 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D58638: [OpenMP 5.0] Parsing/sema support for from clause with mapper modifier

2019-02-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58638/new/ https://reviews.llvm.org/D58638 ___ cfe-commits ma

[PATCH] D38049: [OpenMP] fix seg-faults printing diagnostics with invalid ordered(n) values

2017-09-19 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG https://reviews.llvm.org/D38049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D60583: [AArch64] Implement Vector Funtion ABI name mangling.

2019-06-04 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D60583#1529878 , @jdoerfert wrote: > Why/Where did we decide to clobber the attribute list with "non-existent > function names"? > > This seems to me like an ad-hoc implementation of the RFC that is currently > discussed but c

[PATCH] D60583: [AArch64] Implement Vector Funtion ABI name mangling.

2019-06-04 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D60583#1529885 , @jdoerfert wrote: > In D60583#1529882 , @ABataev wrote: > > > In D60583#1529878 , @jdoerfert > > wrote: > > > > > Why/Where did

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-06-10 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8729 +/// \code +/// void .omp_mapper...(void *rt_mapper_handle, +/// void *base, void *begin, This function looks like the universal one, regardl

[PATCH] D63009: [OpenMP] Add target task alloc function with device ID

2019-06-10 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. This patches does not add any functionality. I thought, it was published by an accident. The patch should be abandoned or reworked to add a functional part of the code. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63009/new/ https://re

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-06-10 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8729 +/// \code +/// void .omp_mapper...(void *rt_mapper_handle, +/// void *base, void *begin, lildmh wrote: > ABataev wrote: > > This function lo

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-06-10 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8729 +/// \code +/// void .omp_mapper...(void *rt_mapper_handle, +/// void *base, void *begin, lildmh wrote: > ABataev wrote: > > lildmh wrote: >

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-06-10 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8729 +/// \code +/// void .omp_mapper...(void *rt_mapper_handle, +/// void *base, void *begin, lildmh wrote: > ABataev wrote: > > lildmh wrote: >

[PATCH] D63009: [OpenMP] Add target task alloc function with device ID

2019-06-13 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:1927 + case OMPRTL__kmpc_omp_target_task_alloc: { +// Build kmp_task_t *__kmpc_omp_task_alloc(ident_t *, kmp_int32 gtid, +// kmp_int32 flags, size_t sizeof_kmp_task_t, size_t sizeof_shareds, -

<    1   2   3   4   5   6   7   8   9   10   >