[PATCH] D53443: [OpenMP][NVPTX] Enable default scheduling for parallel for in non-SPMD cases.

2018-10-29 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/D53443 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

[PATCH] D53827: [OpenMP] Fix condition.

2018-10-29 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. Rename, the patch, it is not an NFC. Repository: rC Clang https://reviews.llvm.org/D53827 ___ cfe-commits mailing list cfe-commits@lists.llv

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

2019-01-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/AST/DeclOpenMP.cpp:164 + if (NumClauses) { +Clauses = (OMPClause **)C.Allocate(sizeof(OMPClause *) * NumClauses); +setClauses(CL); lildmh wrote: > ABataev wrote: > > No, bad idea. Use tail allocation for the

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

2019-01-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/AST/DeclOpenMP.cpp:164 + if (NumClauses) { +Clauses = (OMPClause **)C.Allocate(sizeof(OMPClause *) * NumClauses); +setClauses(CL); lildmh wrote: > ABataev wrote: > > lildmh wrote: > > > ABataev wrote: > > >

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

2019-01-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/AST/DeclOpenMP.cpp:164 + if (NumClauses) { +Clauses = (OMPClause **)C.Allocate(sizeof(OMPClause *) * NumClauses); +setClauses(CL); lildmh wrote: > ABataev wrote: > > lildmh wrote: > > > ABataev wrote: > > >

[PATCH] D56733: [OPENMP] update release note for implemented OMP 5.0 features

2019-01-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. It would be good to update `OpenMPSupport.rst` too to show supported features from OpenMP 5.0. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56733/new/ https://reviews.llvm.org/D56733 ___ cfe-commits mailing list c

[PATCH] D56733: [OPENMP] update release note for implemented OMP 5.0 features

2019-01-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. LG CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56733/new/ https://reviews.llvm.org/D56733 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D56790: [OpenMP] Update release notes with OpenMP related changes

2019-01-16 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, but you need to commit it into release 8.0 Comment at: docs/ReleaseNotes.rst:261 + +- Flag for user to limit collapsed loop counter width when safe to do so. +

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

2019-01-24 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added reviewers: echristo, probinson. Herald added subscribers: aprantl, jholewinski. Added ability to generate correct debug info data about the variable address class. Currently, for all the locals and globals the default values are used, ADDR_local_space(6

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

2019-01-24 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/AST/DeclOpenMP.cpp:164 + if (NumClauses) { +Clauses = (OMPClause **)C.Allocate(sizeof(OMPClause *) * NumClauses); +setClauses(CL); lildmh wrote: > ABataev wrote: > > lildmh wrote: > > > ABataev wrote: > > >

[PATCH] D57113: [clang-tidy] openmp-use-default-none - a new module and a check

2019-01-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: test/clang-tidy/openmp-use-default-none.cpp:26 +void t2() { +#pragma omp parallel default(none) + ; JonasToth wrote: > AFAIK `default(private)` should exist as well, please add tests for the other > kinds, too. No, onl

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

2019-01-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/AST/DeclOpenMP.cpp:164 + if (NumClauses) { +Clauses = (OMPClause **)C.Allocate(sizeof(OMPClause *) * NumClauses); +setClauses(CL); lildmh wrote: > ABataev wrote: > > lildmh wrote: > > > ABataev wrote: > > >

[PATCH] D57112: [ASTTypeTraits] OMPClause handling

2019-01-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/AST/ASTTypeTraits.cpp:114 +#define OPENMP_CLAUSE(Name, Class) \ +case OMPC_##Name: return ASTNodeKind(NKI_##Class); +#include "clang/Basic/OpenMPKinds.def" Well, I thi

[PATCH] D57112: [ASTTypeTraits] OMPClause handling

2019-01-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/AST/ASTTypeTraits.cpp:114 +#define OPENMP_CLAUSE(Name, Class) \ +case OMPC_##Name: return ASTNodeKind(NKI_##Class); +#include "clang/Basic/OpenMPKinds.def" lebedev.ri

[PATCH] D57112: [ASTTypeTraits] OMPClause handling

2019-01-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/AST/ASTTypeTraits.cpp:114 +#define OPENMP_CLAUSE(Name, Class) \ +case OMPC_##Name: return ASTNodeKind(NKI_##Class); +#include "clang/Basic/OpenMPKinds.def" ABataev wro

[PATCH] D57113: [clang-tidy] openmp-use-default-none - a new module and a check

2019-01-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang-tidy/openmp/UseDefaultNoneCheck.cpp:113 +void UseDefaultNoneCheck::registerMatchers(MatchFinder *Finder) { + // If OpenMP is not enabled, don't register the check, it won't find anything. + if (!getLangOpts().OpenMP) ---

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

2019-01-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: include/clang/AST/DeclBase.h:181 +/// This declaration is an OpenMP user defined mapper. +IDNS_OMPMapper = 0x2000 }; Add comma after `0x2000` to exclude this line from the next pactches ===

[PATCH] D57280: [clang][OpenMP] OMPFlushClause is synthetic, no such clause exists

2019-01-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 with a nit Comment at: lib/Basic/OpenMPKinds.cpp:56 #define OPENMP_CLAUSE(Name, Class) .Case(#Name, OMPC_##Name) + OPENMP_CLAUSE(flush, OMPFlushClause) #include "

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

2019-01-28 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. LG CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56326/new/ https://reviews.llvm.org/D56326 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D57280: [clang][OpenMP] OMPFlushClause is synthetic, no such clause exists

2019-01-28 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Basic/OpenMPKinds.cpp:56 #define OPENMP_CLAUSE(Name, Class) .Case(#Name, OMPC_##Name) + OPENMP_CLAUSE(flush, OMPFlushClause) #include "clang/Basic/OpenMPKinds.def" lebedev.ri wrote: > ABataev wrote: > > Just `

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

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

[PATCH] D57452: [ASTDumper][OpenMP] CapturedDecl has a 'nothrow' bit

2019-01-30 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/D57452/new/ https://reviews.llvm.org/D57452 ___ cfe-commits ma

[PATCH] D53141: [OpenMP][libomptarget] Add runtime function for pushing coalesced global records

2018-10-31 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: libomptarget/deviceRTLs/nvptx/src/data_sharing.cu:442 +} + } while (!FrameP); Do you realy need the loop here? Seems to me it is better to have it in `else` branch of the `if (IsWarpMaster)` statement Repositor

[PATCH] D53141: [OpenMP][libomptarget] Add runtime function for pushing coalesced global records

2018-10-31 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu:159 omptarget_nvptx_threadPrivateContext->Level1TaskDescr(threadId); - ASSERT0(LT_FUSSY, newTaskDescr, "expected a task descr"); newTaskDescr->InitLevelOneTaskDescr(ThreadLi

[PATCH] D51554: [CUDA][OPENMP][NVPTX]Improve logic of the debug info support.

2018-10-31 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 172003. ABataev added a comment. Updated processing of the debug options. -g1 (line-tables) is considered as the regular debug directive, which may emit some useful debug info. Repository: rC Clang https://reviews.llvm.org/D51554 Files: include/clang/

[PATCH] D53141: [OpenMP][libomptarget] Add runtime function for pushing coalesced global records

2018-11-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. LG Repository: rOMP OpenMP https://reviews.llvm.org/D53141 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45783: [DEBUGINFO, NVPTX] Render `-no-cuda-debug` LLVM option when required.

2018-11-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev abandoned this revision. ABataev added a comment. The patch is not required anymore as it is implemented in the different way Repository: rC Clang https://reviews.llvm.org/D45783 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[PATCH] D51554: [CUDA][OPENMP][NVPTX]Improve logic of the debug info support.

2018-11-09 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:292 + bool IsDebugEnabled = !A || A->getOption().matches(options::OPT_O0) || +Args.hasFlag(options::OPT_cuda_noopt_device_debug, + options::OPT_n

[PATCH] D54441: [OPENMP] Support relational-op !- (not-equal) as one of the canonical forms of random access iterator

2018-11-12 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/D54441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

[PATCH] D54493: [OPENMP] Check target architecture supports unified shared memory for requires directive

2018-11-13 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/D54493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

[PATCH] D54638: [OpenMP] remove redundant MapTypeModifierSpecified flag in ParseOpenMP.cpp

2018-11-16 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, add `NFC` to the title. Repository: rC Clang https://reviews.llvm.org/D54638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[PATCH] D54708: [OPENMP] NFC: Refactor code for parsing omp declare target directive and its clauses

2018-11-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, mark as NFC Repository: rC Clang https://reviews.llvm.org/D54708 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.ll

[PATCH] D54764: [OpenMP] Update CHECK-DAG usage in for_codegen.cpp

2018-11-20 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. I'm fine with the patch, the original intention was to handle a possible situation where we may have several debug locations with the same line numbers. Repository: rC Clang https://revi

[PATCH] D54765: [OpenMP] Update CHECK-DAG usage in target_parallel_codegen.cpp

2018-11-20 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/D54765 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

[PATCH] D54764: [OpenMP] Update CHECK-DAG usage in for_codegen.cpp

2018-11-20 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In https://reviews.llvm.org/D54764#1304606, @jdenny wrote: > In https://reviews.llvm.org/D54764#1304573, @ABataev wrote: > > > I'm fine with the patch, > > > Thanks for the quick reviews. I'll push soon. > > > the original intention was to handle a possible situation whe

[PATCH] D54958: [OPENMP] remove redundant ColonExpected flag in ParseOpenMP.cpp - (NFC)

2018-11-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 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54958/new/ https://reviews.llvm.org/D54958 ___ cfe-commits ma

[PATCH] D54970: [OpenMP] Add a new version of the SPMD deinit kernel function

2018-11-27 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: test/OpenMP/nvptx_target_parallel_codegen.cpp:71 // CHECK: [[DONE]] - // CHECK: call void @__kmpc_spmd_kernel_deinit() + // CHECK: call void @__kmpc_spmd_kernel_deinit_v2( // CHECK: br label {{%?}}[[EXIT:.+]] Add

[PATCH] D54970: [OpenMP] Add a new version of the SPMD deinit kernel function

2018-11-29 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/D54970/new/ https://reviews.llvm.org/D54970 ___ cfe-commits ma

[PATCH] D51554: [CUDA][OPENMP][NVPTX]Improve logic of the debug info support.

2018-12-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev marked 4 inline comments as done. ABataev added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:282-285 enum DebugInfoKind { - NoDebug, /// No debug info. - LineTableOnly, /// Line tables only. - FullDebug /// Full debug info. + NoDebug,

[PATCH] D51554: [CUDA][OPENMP][NVPTX]Improve logic of the debug info support.

2018-12-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 176993. ABataev marked an inline comment as done. ABataev added a comment. Reworked according to the latest comments from Eric. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51554/new/ https://reviews.llvm.org/D51554 Files:

[PATCH] D55395: Re-order content in OMPDeclareReductionDecl dump

2018-12-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 is wrong, the original implementation is correct and should not be changed. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55395/new/ https://r

[PATCH] D55395: Re-order content in OMPDeclareReductionDecl dump

2018-12-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D55395#1322431 , @rsmith wrote: > In D55395#1322244 , @ABataev wrote: > > > This is wrong, the original implementation is correct and should not be > > changed. > > > The original implem

[PATCH] D55395: Re-order content in OMPDeclareReductionDecl dump

2018-12-10 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/AST/ASTDumper.cpp:1056 } +NodeDumper.dumpPointer(Initializer); + } Better to output it immediately after `initializer` keyword. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org

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

2019-02-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D58463#1410900 , @tra wrote: > There's a new quirk we've ran into after this patch landed. Consider this > code: > > int foo() { > int prev; > __asm__ __volatile__("mov %0, 0" : "=a" (prev)::); > return prev; >

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

2019-02-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D58463#1411039 , @tra wrote: > > Hi Artem, I think we can just delay emission of this warning to solve this > > problem. > > I'm not sure we can always tell whether the warning is real or if it's the > consequence of failing t

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

2019-02-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D58463#1411086 , @tra wrote: > >> E.g.: > >> > >> namespace { > >> __host__ __device__ a() { > >> int prev; > >> __asm__ __volatile__("mov %0, 0" : "=a" (prev)::); > >> return prev; > >> } > >> > >> __hos

[PATCH] D58917: [HIP] Do not unbundle object files for -fno-gpu-rdc

2019-03-05 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/Driver/Driver.cpp:2298 +/// Flag for -fgpu-rdc. +bool Relocatable; public: Set the default initializer for the fie

[PATCH] D58057: Allow bundle size to be 0 in clang-offload-bundler

2019-03-05 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/D58057/new/ https://reviews.llvm.org/D58057 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D58979: [clang][OpenMP] Revert "OMPFlushClause is synthetic, no such clause exists"

2019-03-05 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. Hmm, do we really need the matches for the AST node that is not described/defined by the standard? If this is really so, I'm ok with this. Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D59028: [OpenMP] Enable on device linking with NVLINK to ignore dynamic libraries

2019-03-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:707 CmdArgs.push_back(StaticLibName); +} else if (OrigInputFileName.endswith(".so")) { + // Only static libraries are supported. I would suggest to use `types::lookupTypeFor

[PATCH] D59028: [OpenMP] Enable on device linking with NVLINK to ignore dynamic libraries

2019-03-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:707 CmdArgs.push_back(StaticLibName); +} else if (OrigInputFileName.endswith(".so")) { + // Only static libraries are supported. gtbercea wrote: > ABataev wrote: > > I would

[PATCH] D59028: [OpenMP] Enable on device linking with NVLINK to ignore dynamic libraries

2019-03-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:707 CmdArgs.push_back(StaticLibName); +} else if (OrigInputFileName.endswith(".so")) { + // Only static libraries are supported. gtbercea wrote: > ABataev wrote: > > gtberce

[PATCH] D59028: [OpenMP] Enable on device linking with NVLINK to ignore dynamic libraries

2019-03-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:707 CmdArgs.push_back(StaticLibName); +} else if (OrigInputFileName.endswith(".so")) { + // Only static libraries are supported. gtbercea wrote: > ABataev wrote: > > gtberce

[PATCH] D59214: [clang][OpeMP] Model OpenMP structured-block in AST (PR40563)

2019-03-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: include/clang/AST/StmtOpenMP.h:335 + llvm::Optional getStructuredBlockImpl() const { +return const_cast(getInnermostCapturedStmt()->getCapturedStmt()); No need to insert it into each class, just add: ``` Stmt * OM

[PATCH] D59214: [clang][OpeMP] Model OpenMP structured-block in AST (PR40563)

2019-03-12 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: include/clang/AST/StmtOpenMP.h:335 + llvm::Optional getStructuredBlockImpl() const { +return const_cast(getInnermostCapturedStmt()->getCapturedStmt()); lebedev.ri wrote: > ABataev wrote: > > No need to insert it i

[PATCH] D59214: [clang][OpeMP] Model OpenMP structured-block in AST (PR40563)

2019-03-12 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: include/clang/AST/StmtOpenMP.h:335 + llvm::Optional getStructuredBlockImpl() const { +return const_cast(getInnermostCapturedStmt()->getCapturedStmt()); lebedev.ri wrote: > lebedev.ri wrote: > > ABataev wrote: > >

[PATCH] D59214: [clang][OpeMP] Model OpenMP structured-block in AST (PR40563)

2019-03-13 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: include/clang/AST/StmtOpenMP.h:335 + llvm::Optional getStructuredBlockImpl() const { +return const_cast(getInnermostCapturedStmt()->getCapturedStmt()); lebedev.ri wrote: > lebedev.ri wrote: > > ABataev wrote: > >

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

2019-03-13 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: openmp/libomptarget/cmake/Modules/LibomptargetNVPTXBitcodeLibrary.cmake:81 # if any of them are not supported, there is no point in finding out which are. -set(compiler_flags_required -emit-llvm -O1 --cuda-device-only --cuda-path=${CU

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

2019-03-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: openmp/libomptarget/deviceRTLs/common/target_region.h:27 + +/// The target region _kernel_ interface for GPUs +/// jdoerfert wrote: > ABataev wrote: > > All exported functions are declared in the `interface.h` file. I do

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

2019-03-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: openmp/libomptarget/deviceRTLs/common/target_region.h:27 + +/// The target region _kernel_ interface for GPUs +/// jdoerfert wrote: > ABataev wrote: > > jdoerfert wrote: > > > ABataev wrote: > > > > All exported function

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

2019-03-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: openmp/libomptarget/deviceRTLs/common/target_region.h:27 + +/// The target region _kernel_ interface for GPUs +/// jdoerfert wrote: > ABataev wrote: > > jdoerfert wrote: > > > ABataev wrote: > > > > jdoerfert wrote: > >

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

2019-03-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: openmp/libomptarget/deviceRTLs/common/target_region.h:104 +/// +EXTERN int8_t __kmpc_target_region_kernel_init(ident_t *Ident, bool UseSPMDMode, + bool RequiresOMPRuntime, I

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

2019-03-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: openmp/libomptarget/deviceRTLs/common/target_region.h:104 +/// +EXTERN int8_t __kmpc_target_region_kernel_init(ident_t *Ident, bool UseSPMDMode, + bool RequiresOMPRuntime, j

[PATCH] D59424: [OpenMP][NVPTX] Replace void** buffer by byte-wise buffer

2019-03-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h:73 +/// Note: Only the team master is allowed to call non-const functions! +struct shared_bytes_buffer { + jdoerfert wrote: > > What is this buffer used for? Tra

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

2019-03-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: openmp/libomptarget/deviceRTLs/common/target_region.h:104 +/// +EXTERN int8_t __kmpc_target_region_kernel_init(ident_t *Ident, bool UseSPMDMode, + bool RequiresOMPRuntime, j

[PATCH] D59424: [OpenMP][NVPTX] Replace void** buffer by byte-wise buffer

2019-03-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h:73 +/// Note: Only the team master is allowed to call non-const functions! +struct shared_bytes_buffer { + jdoerfert wrote: > ABataev wrote: > > jdoerfert wrote:

[PATCH] D59424: [OpenMP][NVPTX] Replace void** buffer by byte-wise buffer

2019-03-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h:73 +/// Note: Only the team master is allowed to call non-const functions! +struct shared_bytes_buffer { + jdoerfert wrote: > ABataev wrote: > > jdoerfert wrote:

[PATCH] D59214: [clang][OpeMP] Model OpenMP structured-block in AST (PR40563)

2019-03-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. The OpenMP part looks good. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59214/new/ https://reviews.llvm.org/D59214 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

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

2019-03-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Could you provide a little bit more comments what are you doing in this patch? It would be good t have a detailed description of the codegen scheme. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:2390 } + case OMPRTL__tgt_target_data_mapper: { +//

[PATCH] D59214: [clang][OpeMP] Model OpenMP structured-block in AST (PR40563)

2019-03-20 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. LG for the OpenMP part Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59214/new/ https://reviews.llvm.org/D59214 ___ cfe-commits mailing list cfe-commits@lists.

[PATCH] D59609: [clang][OpenMP] Fix build when using libgomp

2019-03-20 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. If the compiler is built without OpenMP support -fopenmp is converted to -fopenmp=libgomp frontend option. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59609/new/ https://reviews.llvm.org/D59609 ___

[PATCH] D59609: [clang][OpenMP] Fix build when using libgomp

2019-03-20 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/D59609/new/ https://reviews.llvm.org/D59609 ___

[PATCH] D59712: [APSInt][OpenMP] Fix isNegative, etc. for unsigned types

2019-03-29 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. I'm fine with the changes in the OpenMP tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59712/new/ https://reviews.llvm.org/D59712 ___ cfe-commits mailing list cfe-commits@

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-04-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Patch breaks the build with the shared libraries, for example, http://lab.llvm.org:8011/builders/clang-ppc64le-linux-multistage/builds/9498. Seems to me, you need to add an extra dependency on clangTooling. clangToolingCore is not enough. Repository: rC Clang CHANG

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-04-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. You need to provide -DBUILD_SHARED_LIBS=true to cmake. Unfortunately, there is a dependency from the libToolingRefactor to libTooling. I don't think it will be easy to fix this. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59376/new/ h

[PATCH] D60213: Add clangTooling dependency to fix the build.

2019-04-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Nope, it won't work. There is a cyclic dependency, unfortunately. clangTooling depends on clangToolingRefactor already. You need to revert your commit and refactor it to remove the cyclic dependency. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D60213: Add clangTooling dependency to fix the build.

2019-04-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. I can revert it for you, if you want Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60213/new/ https://reviews.llvm.org/D60213 ___ cfe-commits mailing list cfe-commits@lists.llv

[PATCH] D60213: Add clangTooling dependency to fix the build.

2019-04-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Reverted in r357612 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60213/new/ https://reviews.llvm.org/D60213 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[PATCH] D60455: [SYCL] Add support for SYCL device attributes

2019-04-09 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D60455#1459678 , @Fznamznon wrote: > Hi all, > > I assume that something to mark the code which is supposed to be offloaded > already is implemented for OpenMP and CUDA. For example I found CUDA-specific > CUDADevice attribute

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

2019-04-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:2576 void CodeGenModule::EmitOMPRequiresDecl(const OMPRequiresDecl *D) { - getOpenMPRuntime().checkArchForUnifiedAddressing(D); } You don't need to pass the reference to CodeGenModule to CGOpenM

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

2019-04-12 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:473 + /// atomic_default_mem_order seq_cst clause. + OMP_REQ_ATOMIC_DEFAULT_SEQ_CST = 0x008, + /// atomic_default_mem_order acq_rel clause. YOu don't need al these flags, add only targ

[PATCH] D40577: Clang support for simd functions

2019-04-12 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:9615 + + std::string Buffer; + if (Fn->hasFnAttribute("vector-variants")) { 1. Why this change is required? 2. Why not a `SmallString`? Comment at: clang/test/Op

[PATCH] D40577: Clang support for simd functions

2019-04-12 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:9615 + + std::string Buffer; + if (Fn->hasFnAttribute("vector-variants")) { mmasten wrote: > ABataev wrote: > > 1. Why this change is required? > > 2. Why not a `SmallString`? > Th

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

2019-04-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8970 +if (Clause->getClauseKind() == OMPC_unified_shared_memory) + CGM.getOpenMPRuntime().HasRequiresUnifiedSharedMemory = true; + } You can do `break;` here, no need for further

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

2019-04-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8978 +if (Clause->getClauseKind() == OMPC_unified_shared_memory) { + CGM.getOpenMPRuntime().HasRequiresUnifiedSharedMemory = true; + break; gtbercea wrote: > gtbercea wrote:

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

2019-04-16 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC358490: [AArch64] Implement Vector Funtion ABI name mangling. (authored by ABataev, committed by ). Herald added a project: clang. Herald added a subscriber: cfe-commits. Changed prior to commit: https:

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

2019-04-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.h:644 + /// Flag for keeping track of weather a target region has been emitted. + bool hasEmittedTargetRegion = false; + Why do you need this? I think your function should be called without

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

2019-04-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.h:644 + /// Flag for keeping track of weather a target region has been emitted. + bool hasEmittedTargetRegion = false; + gtbercea wrote: > ABataev wrote: > > Why do you need this? I think yo

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

2019-04-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.h:644 + /// Flag for keeping track of weather a target region has been emitted. + bool hasEmittedTargetRegion = false; + gtbercea wrote: > gtbercea wrote: > > ABataev wrote: > > > gtbercea w

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

2019-04-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.h:644 + /// Flag for keeping track of weather a target region has been emitted. + bool hasEmittedTargetRegion = false; + gtbercea wrote: > ABataev wrote: > > gtbercea wrote: > > > gtbercea w

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

2019-04-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8975 +CGM.Error(Clause->getBeginLoc(), + "Target region emitted before requires directive."); + HasRequiresUnifiedSharedMemory = true; The message speaks abou

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

2019-04-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Other tests in presence of the requires directive with the clause? Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8975 +CGM.Error(Clause->getBeginLoc(), + "Target region emitted before requires directive."); + HasRequiresUnifi

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

2019-04-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:7956 // Map other list items in the map clause which are not captured variables -// but "declare target link" global variables., +// but "declare target link" global variables. for (const

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

2019-04-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Sema/SemaOpenMP.cpp:476 + isa(CNew))) { +SemaRef.Diag(Loc, + diag::err_omp_target_before_requires) gtbercea wrote: > ABataev wrote: > > DSAStack usually is not used for diagnosti

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

2019-04-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:9135 "%0 clause previously used here">; +def err_omp_target_before_requires : Error < + "Target region encountered before requires directive with %0 clause.">; Split the pat

[PATCH] D60875: [OpenMP] Add checks for requires and target directives.

2019-04-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:9136 +def err_omp_target_before_requires : Error < + "Target region encountered before requires directive with %0 clause">; +def note_omp_requires_encountered_target : Note < E

[PATCH] D60875: [OpenMP] Add checks for requires and target directives.

2019-04-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Sema/SemaOpenMP.cpp:4207 +DSAStack->hasRequiresDeclWithClause()) && + !CurContext->isDependentContext()) { +// Register target to DSA Stack. ABataev wrote: > Better to check for the dependent context

[PATCH] D60875: [OpenMP] Add checks for requires and target directives.

2019-04-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:9136 +def err_omp_target_before_requires : Error < + "Target region encountered before requires directive with '%0' clause">; +def note_omp_requires_encountered_target : Note <

[PATCH] D60875: [OpenMP] Add checks for requires and target directives.

2019-04-18 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/D60875/new/ https://reviews.llvm.org/D60875 ___ cfe-commits ma

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

2019-04-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: test/OpenMP/openmp_offload_registration.cpp:40 +// CHECK: ret void +// CHECK: declare void @__tgt_register_requires(i64) + ABataev wrote: > Why do you need this check? Again, this check is not required

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