[PATCH] D56113: [OpenMP] Replace predetermined shared for const variable

2019-01-04 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:9736 +static bool rejectConstNotMutableType(Sema &SemaRef, ValueDecl *D, + OpenMPClauseKind CKind, ABataev wrote: > This function and the original code

[PATCH] D56298: [OpenMP] Refactor const restriction for reductions

2019-01-04 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. LG Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56298/new/ https://reviews.llvm.org/D56298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

[PATCH] D56299: [OpenMP] Refactor const restriction for linear

2019-01-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 Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56299/new/ https://reviews.llvm.org/D56299 ___ cfe-commits ma

[PATCH] D56113: [OpenMP] Replace predetermined shared for const variable

2019-01-04 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:1115 + +static bool isConstNotMutableType(Sema &SemaRef, ValueDecl *D) { + return checkConstNotMutableType(SemaRef, D, /*ReportDiag*/ false, I would say it is better to outlined check as a

[PATCH] D56113: [OpenMP] Replace predetermined shared for const variable

2019-01-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 Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56113/new/ https://reviews.llvm.org/D56113 ___ cfe-commits ma

[PATCH] D56430: Incorrect implicit data-sharing for nested tasks

2019-01-08 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Sema/SemaOpenMP.cpp:680 + +bool isParallelRegion(OpenMPDirectiveKind DKind) { + return isOpenMPParallelDirective(DKind) || isOpenMPTeamsDirective(DKind); Better to rename it to `isImplicitTaskingRegion` Repository

[PATCH] D56413: [OpenMP] Avoid remainder operations for loop index values on a collapsed loop nest.

2019-01-08 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Sema/SemaOpenMP.cpp:5520 +ExprResult Acc = + SemaRef.ActOnIntegerConstant(SourceLocation(), 0).get(); +for (unsigned int Cnt = 0; Cnt < NestedLoopCount; Cnt++) { No need for `.get()` here =

[PATCH] D56413: [OpenMP] Avoid remainder operations for loop index values on a collapsed loop nest.

2019-01-08 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Sema/SemaOpenMP.cpp:5523 SourceLocation UpdLoc = IS.IncSrcRange.getBegin(); - // Build: Iter = (IV / Div) % IS.NumIters - // where Div is product of previous iterations' IS.NumIters. - ExprResult Iter; - if

[PATCH] D56413: [OpenMP] Avoid remainder operations for loop index values on a collapsed loop nest.

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

[PATCH] D56430: Incorrect implicit data-sharing for nested tasks

2019-01-09 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 D56430#1350706 , @smateo wrote: > Renaming the `isParallelRegion` function to `isImplicitTaskingRegion`. > > Shall we rename the `isParallelOrTaskR

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

2019-01-09 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); No, bad idea. Use tail allocation for the clauses. Check the implementation

[PATCH] D56430: Incorrect implicit data-sharing for nested tasks

2019-01-09 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Will you commit this patch? Or I should do it? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56430/new/ https://reviews.llvm.org/D56430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D56430: Incorrect implicit data-sharing for nested tasks

2019-01-09 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D56430#1351212 , @smateo wrote: > I don't have commit access yet. Would you mind to commit it for me? Thanks!, > > Sergi Sure, no problems. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56430/

[PATCH] D56430: Incorrect implicit data-sharing for nested tasks

2019-01-09 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL350734: Incorrect implicit data-sharing for nested tasks (authored by ABataev, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D56430?vs=180844

[PATCH] D66559: [OPENMP] Update the diagnosis message for canonical loop form

2019-09-10 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D66559#1665289 , @cchen wrote: > Oh, I was thinking that I could use "arc land" to commit my patch, but just > now realize that I don't have the commit privileges. Would you please commit > for me? Thanks. Sure, will do this

[PATCH] D67294: Register and parse a simplified version of '#pragma omp declare variant'

2019-09-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: include/clang/Basic/Attr.td:3220 +private: + NamedDecl *VecVarNamedDecl; + andwar wrote: > ABataev wrote: > > This is definitely wrong, especially if we need to handle templates. > What else would you use? Also,

[PATCH] D64943: [Clang][OpenMP offload] Eliminate use of OpenMP linker script

2019-09-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D64943#158 , @JonChesterfield wrote: > > OpenMP linker script is known to cause problems for gold and lld linkers on > > Linux and it will also cause problems for Windows enabling in future > > What are the known problems

[PATCH] D64943: [Clang][OpenMP offload] Eliminate use of OpenMP linker script

2019-09-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D64943#178 , @JonChesterfield wrote: > In D64943#173 , @ABataev wrote: > > > In D64943#158 , > > @JonChesterfield wrote: > > > > > >

[PATCH] D67978: [OpenMP 5.0] Fix user-defined mapper lookup in sema for arrays

2019-09-24 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. What happens without this patch? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67978/new/ https://reviews.llvm.org/D67978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[PATCH] D67978: [OpenMP 5.0] Fix user-defined mapper lookup in sema for arrays

2019-09-24 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D67978#1681318 , @lildmh wrote: > Without this patch, it cannot recognize array with mapper, for instance, > `#pragma omp target map(mapper(a),to: arr[0:2])` won't work without this > patch. What if we have a mapper for the

[PATCH] D67978: [OpenMP 5.0] Fix user-defined mapper lookup in sema for arrays

2019-09-24 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D67978#1681333 , @lildmh wrote: > In D67978#1681319 , @ABataev wrote: > > > In D67978#1681318 , @lildmh wrote: > > > > > Without this patch, it ca

[PATCH] D64943: [Clang][OpenMP offload] Eliminate use of OpenMP linker script

2019-09-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Driver/Driver.cpp:3125 +ActionList DeviceAL; +for (auto *SB : SpecializedBuilders) { + if (!SB->isValid()) User real type instead of `auto *` Comment at: clang/lib/Driver/Driver.

[PATCH] D67978: [OpenMP 5.0] Fix user-defined mapper lookup in sema for arrays

2019-09-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Definitely need positive tests with ast printing and codegen. Comment at: lib/Sema/SemaOpenMP.cpp:14751 +assert(Type->getAsArrayTypeUnsafe() && "Expect to get a valid array type"); +Type = Type->getAsArrayTypeUnsafe()->getElementType().getCanoni

[PATCH] D67978: [OpenMP 5.0] Fix user-defined mapper lookup in sema for arrays

2019-09-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D67978#1683146 , @lildmh wrote: > HI Alexey, the ast print test is already there. Because I didn't check the > mapper for array type before, such code will always not report any error, and > ast print test is correct. Codegen

[PATCH] D67978: [OpenMP 5.0] Fix user-defined mapper lookup in sema for arrays

2019-09-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D67978#1684104 , @lildmh wrote: > In D67978#1683166 , @ABataev wrote: > > > In D67978#1683146 , @lildmh wrote: > > > > > HI Alexey, the ast print

[PATCH] D67978: [OpenMP 5.0] Fix user-defined mapper lookup in sema

2019-09-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Sema/SemaOpenMP.cpp:14805 + if (!Type->isStructureOrClassType() && !Type->isUnionType() && + (MapperIdScopeSpec.isSet() || MapperId.getAsString() != "default")) { +SemaRef.Diag(Loc, diag::err_omp_mapper_wrong_type); ---

[PATCH] D67978: [OpenMP 5.0] Fix user-defined mapper lookup in sema

2019-09-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Sema/SemaOpenMP.cpp:14805 + if (!Type->isStructureOrClassType() && !Type->isUnionType() && + (MapperIdScopeSpec.isSet() || MapperId.getAsString() != "default")) { +SemaRef.Diag(Loc, diag::err_omp_mapper_wrong_type); ---

[PATCH] D67978: [OpenMP 5.0] Fix user-defined mapper lookup in sema

2019-09-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Sema/SemaOpenMP.cpp:14805 + if (!Type->isStructureOrClassType() && !Type->isUnionType() && + (MapperIdScopeSpec.isSet() || MapperId.getAsString() != "default")) { +SemaRef.Diag(Loc, diag::err_omp_mapper_wrong_type); ---

[PATCH] D67978: [OpenMP 5.0] Fix user-defined mapper lookup in sema

2019-09-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Sema/SemaOpenMP.cpp:14805 + if (!Type->isStructureOrClassType() && !Type->isUnionType() && + (MapperIdScopeSpec.isSet() || MapperId.getAsString() != "default")) { +SemaRef.Diag(Loc, diag::err_omp_mapper_wrong_type); ---

[PATCH] D67978: [OpenMP 5.0] Fix user-defined mapper lookup in sema

2019-09-26 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. Comment at: lib/Sema/SemaOpenMP.cpp:14805 + if (!Type->isStructureOrClassType() && !Type->isUnionType() && + (MapperIdScopeSpec.isSet() || MapperId.getAsString()

[PATCH] D67978: [OpenMP 5.0] Fix user-defined mapper lookup in sema

2019-09-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D67978#1684845 , @lildmh wrote: > Thanks Alexey! Please check the other 2 mapper patches at > https://reviews.llvm.org/D67833 and https://reviews.llvm.org/D68100 when you > have time. They should be the last mapper patches.

[PATCH] D67837: [CUDA][HIP] Fix host/device check with -fopenmp

2019-10-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Sema/SemaDecl.cpp:17618 + + if (LangOpts.CUDA) { +// When compiling for device, host functions are never emitted. Similarly, Are you going to handle `#pragma omp declare target device_type(nohost)` in Cuda mod

[PATCH] D67031: [Clang][Bundler] Error reporting improvements

2019-10-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp:133 /// returned if there are no more bundles to be read. - virtual StringRef ReadBundleStart(MemoryBuffer &Input) = 0; + virtual Expected> + ReadBundleStart(MemoryBuffer &I

[PATCH] D68166: [Clang][OpenMP Offload] Add new tool for wrapping offload device binaries

2019-10-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Driver/Driver.cpp:2284-2289 -/// Append top level actions generated by the builder. Return true if errors -/// were found. +/// Append top level actions generated by the builder. virtual void appendTopLevelAct

[PATCH] D68355: [Clang][Driver][NFC] Corrected DeviceActionBuilder methods' comments.

2019-10-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Mark the patch as NFC. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68355/new/ https://reviews.llvm.org/D68355 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[PATCH] D68355: [Clang][Driver][NFC] Corrected DeviceActionBuilder methods' comments.

2019-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. In D68355#1691963 , @sdmitriev wrote: > In D68355#1691961 , @ABataev wrote: > > > Mark the patch as NFC. > >

[PATCH] D42581: [NVPTX] Emit debug info in DWARF-2 by default for Cuda devices.

2018-04-18 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330272: [NVPTX] Emit debug info in DWARF-2 by default for Cuda devices. (authored by ABataev, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D

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

2018-04-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added reviewers: tra, jlebar, echristo. Herald added a subscriber: JDevlieghere. When emission of the lineinfo is requested for the NVPTX, render the LLVM `-no-cuda-debug` option to disable emission of the `debug` option in the `.target` directive. Required f

[PATCH] D46071: Representing the target device information in the LLVM IR

2018-04-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Hmm, I don't think this is correct. I think it is against the OpenMP standard. According to OpenMP 4.5: When an original variable is mapped to a device data environment and the associated 19 corresponding variable is not present in the device data environment, a new corr

[PATCH] D46370: [OPENMP] Fix test typos: CHECK-DAG-N -> CHECK-N-DAG

2018-05-03 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/D46370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D48735: [OPENMP] Fix incomplete type check for array reductions

2018-06-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 Repository: rC Clang https://reviews.llvm.org/D48735 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

[PATCH] D48808: [CodeGen] Emit parallel_loop_access for each loop in the loop stack.

2018-07-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. I don't think that this is the intended behavior of the `#pragma clang loop`. it is better to ask the author of this pragma is this correct or not. Repository: rC Clang https://reviews.llvm.org/D48808 ___ cfe-commits mai

[PATCH] D49148: [DEBUGINFO] Disable unsupported debug info options for NVPTX target.

2018-07-10 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added a reviewer: echristo. Herald added subscribers: JDevlieghere, aprantl. Some targets support only default set of the debug options and do not support additional debug options, like NVPTX target. Patch introduced virtual function supportsNonDefaultDebugOp

[PATCH] D49188: [OpenMP] Initialize data sharing stack for SPMD case

2018-07-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Tests? Repository: rC Clang https://reviews.llvm.org/D49188 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D49188: [OpenMP] Initialize data sharing stack for SPMD case

2018-07-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. What about the check for the new function call? Repository: rC Clang https://reviews.llvm.org/D49188 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D49188: [OpenMP] Initialize data sharing stack for SPMD case

2018-07-12 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: test/OpenMP/nvptx_data_sharing.cpp:33 // CK1: call void @llvm.nvvm.barrier0() -// CK1: call void @__kmpc_data_sharing_init_stack It is better to check that this call is not emitted, like this `CK1-NOT: call void @__k

[PATCH] D49188: [OpenMP] Initialize data sharing stack for SPMD case

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

[PATCH] D49148: [DEBUGINFO] Disable unsupported debug info options for NVPTX target.

2018-07-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In https://reviews.llvm.org/D49148#1165826, @echristo wrote: > I think you should break it out on an option by option basis. Just warning on > "non-standard" options won't make as much sense to end users. Perhaps a "this > option is unsupported on the target you're comp

[PATCH] D49148: [DEBUGINFO] Disable unsupported debug info options for NVPTX target.

2018-07-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 156139. ABataev added a comment. Renamed function supportsNonDefaultDebugOptions() -> supportsDebugInfoOption(const Arg*). Instead of the enum it accepts and should check one of the debug info options. Repository: rC Clang https://reviews.llvm.org/D4914

[PATCH] D67837: [CUDA][HIP] Fix host/device check with -fopenmp

2019-10-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Sema/SemaCUDA.cpp:604 // Do we know that we will eventually codegen the given function? static bool IsKnownEmitted(Sema &S, FunctionDecl *FD) { + return S.getEmissionStatus(FD) == Sema::FunctionEmissionStatus::Emitted; ---

[PATCH] D67837: [CUDA][HIP] Fix host/device check with -fopenmp

2019-10-08 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Sema/SemaCUDA.cpp:616 if (getLangOpts().CUDAIsDevice) { -return IsKnownEmitted(*this, dyn_cast(CurContext)) +return (getEmissionStatus(dyn_cast(CurContext)) == +FunctionEmissionStatus::Emitted)

[PATCH] D67837: [CUDA][HIP] Fix host/device check with -fopenmp

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

[PATCH] D68746: [Clang][OpenMP Offload] Move offload registration code to the wrapper

2019-10-10 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/tools/clang-offload-wrapper/ClangOffloadWrapper.cpp:74 + IntegerType *getSizeTTy() { +switch (M.getDataLayout().getPointerTypeSize(Type::getInt8PtrTy(C))) { +case 4u: Same question as before: maybe better

[PATCH] D68746: [Clang][OpenMP Offload] Move offload registration code to the wrapper

2019-10-10 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/tools/clang-offload-wrapper/ClangOffloadWrapper.cpp:74 + IntegerType *getSizeTTy() { +switch (M.getDataLayout().getPointerTypeSize(Type::getInt8PtrTy(C))) { +case 4u: sdmitriev wrote: > ABataev wrote: > >

[PATCH] D68746: [Clang][OpenMP Offload] Move offload registration code to the wrapper

2019-10-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/tools/clang-offload-wrapper/ClangOffloadWrapper.cpp:74 + IntegerType *getSizeTTy() { +switch (M.getDataLayout().getPointerTypeSize(Type::getInt8PtrTy(C))) { +case 4u: sdmitriev wrote: > grokos wrote: > > s

[PATCH] D68746: [Clang][OpenMP Offload] Move offload registration code to the wrapper

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

[PATCH] D67031: [Clang][Bundler] Error reporting improvements

2019-10-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp:133 /// returned if there are no more bundles to be read. - virtual StringRef ReadBundleStart(MemoryBuffer &Input) = 0; + virtual Expected> + ReadBundleStart(MemoryBuffer &I

[PATCH] D69088: [Lex] #pragma clang transform

2019-10-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Why not try to improve the existing #pragma clang loop rather than add a new pragma with almost the same behavior? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69088/new/ https://reviews.llvm.org/D69088 __

[PATCH] D69140: [clang-offload-wrapper][NFC] Use captured name of the entry type in LIT test

2019-10-17 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/D69140/new/ https://reviews.llvm.org/D69140 ___

[PATCH] D69088: [Lex] #pragma clang transform

2019-10-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D69088#1713901 , @Meinersbur wrote: > In D69088#1713831 , @tyler.nowicki > wrote: > > > That approach would avoid the inevitable conflicts of having both loop and > > transform pragmas

[PATCH] D69316: [OpenMP 5.0] target update list items need not be contiguous (Sema)

2019-10-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:14450 + if (HasMeetPointer && !IsLastArraySection) { +SemaRef.Diag(ELoc, diag::err_omp_pointer_type_not_last) Ad the check for the version of OpenMP standard, it must be allow

[PATCH] D69204: [OpenMP 5.0] - Extend defaultmap

2019-10-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:52-74 enum DefaultMapAttributes { - DMA_unspecified, /// Default mapping is not specified. - DMA_tofrom_scalar, /// Default mapping is 'tofrom:scalar'. + DMA_unspecified, /// Default mappin

[PATCH] D67031: [Clang][Bundler] Error reporting improvements

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

[PATCH] D69204: [OpenMP 5.0] - Extend defaultmap

2019-10-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:4463-4890 + if (AStmt && !CurContext->isDependentContext()) { assert(isa(AStmt) && "Captured statement expected"); // Check default data sharing attributes for referenced variables. DSAAt

[PATCH] D69204: [OpenMP 5.0] - Extend defaultmap

2019-10-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:137-140 + SourceLocation Loc) { + ImplicitBehavior = IB; + VariableCategory = VC; + SLoc = Loc; Use member initializers in constructors. Comment

[PATCH] D69204: [OpenMP 5.0] - Extend defaultmap

2019-10-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/TreeTransform.h:1987-2001 + /// Build a new OpenMP 'defaultmap' clause. + /// + /// By default, performs semantic analysis to build the new OpenMP clause. + /// Subclasses may override this routine to provide different

[PATCH] D69494: OpenMP: Add helper function for convergent runtime calls

2019-10-27 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D69494#1722867 , @arsenm wrote: > In D69494#1722853 , @ABataev wrote: > > > Tests? > > > > > In D69494#1722853 , @ABataev wrote: > > > Tests? > >

[PATCH] D69494: OpenMP: Add helper function for convergent runtime calls

2019-10-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. Ah, yes, missed this. Then just add a comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69494/new/ https://reviews.llvm.org/D69494 __

[PATCH] D79966: [OPENMP]Fix PR45911: Data sharing and lambda capture.

2020-05-20 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 265246. ABataev added a comment. Herald added a subscriber: sstefan1. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79966/new/ https://reviews.llvm.org/D79966 Files: clang/lib/CodeGen/CGOpenMPRuntime.

[PATCH] D79966: [OPENMP]Fix PR45911: Data sharing and lambda capture.

2020-05-20 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG414afdf940e8: [OPENMP]Fix PR45911: Data sharing and lambda capture. (authored by ABataev). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79966/new/ https://

[PATCH] D79921: [OPENMP] Fix mixture of omp and clang pragmas

2020-05-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 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79921/new/ https://reviews.llvm.org/D79921 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D79972: [OpenMP5.0] map item can be non-contiguous for target update

2020-05-21 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. How are you going to pass this non-contiguous data in the runtime? Are you going to map it in a loop or convert this non-contiguous data into the contiguous and map it as a contiguous chunk of data? Your presentation provides interface only interface changes but has not

[PATCH] D80404: [OPENMP50]Initial support for use_device_addr clause.

2020-05-21 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added a reviewer: jdoerfert. Herald added subscribers: llvm-commits, sstefan1, arphaman, guansong, yaxunl. Herald added projects: clang, LLVM. Added parsing/sema analysis/serialization support for use_device_addr clauses. Repository: rG LLVM Github Monore

[PATCH] D80404: [OPENMP50]Initial support for use_device_addr clause.

2020-05-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 266076. ABataev added a comment. Rebase + cleanup Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80404/new/ https://reviews.llvm.org/D80404 Files: clang/include/clang/AST/OpenMPClause.h clang/include/clang/

[PATCH] D80590: [WIP][OPENMP] Fix assertion error for using alignas with OpenMP directive

2020-05-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D80590#2055937 , @cchen wrote: > Haven't added test yet since I'm not sure in which file should I add the test. Where is the directive? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D80404: [OPENMP50]Initial support for use_device_addr clause.

2020-05-27 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa888fc6b3412: [OPENMP50]Initial support for use_device_addr clause. (authored by ABataev). Changed prior to commit: https://reviews.llvm.org/D80404?vs=266076&id=266568#toc Repository: rG LLVM Github

[PATCH] D79972: [OpenMP5.0] map item can be non-contiguous for target update

2020-05-27 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Is my guess correct that for OpenMP >= 50 for target update directive we always emit `possibly non-continuous` runtime calls? Comment at: clang/include/clang/AST/OpenMPClause.h:5315 + private llvm::TrailingObjects< + OMPMapClause, Expr *,

[PATCH] D79972: [OpenMP5.0] map item can be non-contiguous for target update

2020-05-27 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D79972#2058555 , @cchen wrote: > In D79972#2058516 , @ABataev wrote: > > > Is my guess correct that for OpenMP >= 50 for target update directive we > > always emit `possibly non-continuo

[PATCH] D80730: [OPENMP50]Codegen for use_device_addr clauses.

2020-05-28 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added a reviewer: jdoerfert. Herald added subscribers: sstefan1, guansong, yaxunl. Herald added a project: clang. Added codegen for use_device_addr clause. The components of the list items are mapped as a kind of RETURN components and then the returned base a

[PATCH] D79972: [OpenMP5.0] map item can be non-contiguous for target update

2020-05-28 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Did you think about implementing it in the compiler instead of the runtime? Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:8397-8400 + if (OASE || OAShE || + dyn_cast(I->getAssociatedExpression())) { +DimSize++; + } ---

[PATCH] D79972: [OpenMP5.0] map item can be non-contiguous for target update

2020-05-28 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:16537 AllowWholeSizeArraySection = false; +} else if (DKind == OMPD_target_update && + SemaRef.getLangOpts().OpenMP >= 50) { cchen wrote: > ABataev wrote: > > cche

[PATCH] D80590: [WIP][OPENMP] Fix assertion error for using alignas with OpenMP directive

2020-05-28 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Investigated the bug. Seems to me, the bug is not related to OpenMP. The following code crashes the compiler too: struct FOO { static const int vec_align_bytes = 32; void foo() { alignas(vec_align_bytes) double a; ; } }; Seems to

[PATCH] D80240: [OPENMP50]Initial codegen for 'affinity' clauses.

2020-05-29 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 267254. ABataev added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80240/new/ https://reviews.llvm.org/D80240 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp clang/lib/CodeGen/CGOpenMPRunti

[PATCH] D74387: [OpenMP][SYCL] Improve diagnosing of unsupported types usage

2020-05-29 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Seems to me, this patch crashes `llvm-project/openmp/libomptarget/test/mapping/declare_mapper_api.cpp`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74387/new/ https://reviews.llvm.org/D74387 __

[PATCH] D78232: [OPENMP50]Codegen for scan directive in simd loops.

2020-05-29 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 267283. ABataev added a comment. Herald added a subscriber: sstefan1. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78232/new/ https://reviews.llvm.org/D78232 Files: clang/include/clang/AST/OpenMPClau

[PATCH] D79948: [OPENMP50]Codegen for inscan reductions in worksharing directives.

2020-05-29 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 267298. ABataev added a comment. Herald added a subscriber: sstefan1. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79948/new/ https://reviews.llvm.org/D79948 Files: clang/include/clang/AST/OpenMPClau

[PATCH] D80829: [OpenMP][SYCL] Do not crash on attempt to diagnose unsupported type use

2020-05-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: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80829/new/ https://reviews.llvm.org/D80829 ___

[PATCH] D80240: [OPENMP50]Initial codegen for 'affinity' clauses.

2020-05-29 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev marked an inline comment as done. ABataev added inline comments. Comment at: clang/test/OpenMP/task_affinity_codegen.cpp:54 + // kmp_task_affinity_info_t affs[]; + // CHECK: [[AFFS_ADDR:%.+]] = alloca %struct.kmp_task_affinity_info_t, i64 [[NUM_ELEMS]], + // store i64

[PATCH] D80925: Fix compiler crash when trying to parse alignment argument as a constant expression.

2020-06-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added reviewers: rjmccall, rsmith. Herald added a project: clang. Clang crashes when trying to finish function body. MaybeODRUseExprs is not empty because of const static data member parsed in outer evaluation context, upon call for isTypeIdInParens() functio

[PATCH] D80936: [OPENMP]Fix PR46146: Do not consider globalized variables as NRVO candidates.

2020-06-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added a reviewer: jdoerfert. Herald added subscribers: sstefan1, guansong, yaxunl. Herald added a project: clang. If the variables must be globalized in OpenMP mode (local automatic variable, GPU compilation mode, the variable may escape its declaration conte

[PATCH] D80925: Fix compiler crash when trying to parse alignment argument as a constant expression.

2020-06-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D80925#2066728 , @rjmccall wrote: > Narrowly this seems to fix the immediate problem, but I feel like we're in > trouble if tentative parsing is changing the semantic context in ways that > persist. In particular, I'm concern

[PATCH] D80925: Fix compiler crash when trying to parse alignment argument as a constant expression.

2020-06-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D80925#2067145 , @rjmccall wrote: > In D80925#2066915 , @ABataev wrote: > > > In D80925#2066728 , @rjmccall > > wrote: > > > > > Narrowly this se

[PATCH] D80925: Fix compiler crash when trying to parse alignment argument as a constant expression.

2020-06-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 267743. ABataev added a comment. Reworked after comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80925/new/ https://reviews.llvm.org/D80925 Files: clang/include/clang/Basic/TokenKinds.def clang/lib/

[PATCH] D80925: Fix compiler crash when an expression parsed in the tentative parsing and must be claimed in the another evaluation context.

2020-06-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev marked an inline comment as done. ABataev added inline comments. Comment at: clang/lib/Parse/ParseExpr.cpp:1009 + Actions, Sema::ExpressionEvaluationContext::Unevaluated, + Sema::ReuseLambdaContextDecl); + Res = Actions.TransformToPotent

[PATCH] D80240: [OPENMP50]Initial codegen for 'affinity' clauses.

2020-06-02 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG89d9dba2c688: [OPENMP50]Initial codegen for 'affinity' clauses. (authored by ABataev). Changed prior to commit: https://reviews.llvm.org/D80240?vs=267254&id=267895#toc Repository: rG LLVM Github Mono

[PATCH] D79972: [OpenMP5.0] map item can be non-contiguous for target update

2020-06-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Still: Did you think about implementing it in the compiler instead of the runtime? Comment at: clang/include/clang/AST/OpenMPClause.h:4676-4677 explicit MappableComponent() = default; -explicit MappableComponent(Expr *AssociatedExpression, +

[PATCH] D80925: Fix compiler crash when an expression parsed in the tentative parsing and must be claimed in the another evaluation context.

2020-06-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 267927. ABataev added a comment. Rebase + fixes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80925/new/ https://reviews.llvm.org/D80925 Files: clang/include/clang/Basic/TokenKinds.def clang/lib/Parse/Pars

[PATCH] D80590: [WIP][OPENMP] Fix assertion error for using alignas with OpenMP directive

2020-06-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Must be fixed in 2f7269b6773de2750f9cd1417ef5f21cd6cf7a91 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80590/new/ https://reviews.llvm.org/D80590 __

[PATCH] D80925: Fix compiler crash when an expression parsed in the tentative parsing and must be claimed in the another evaluation context.

2020-06-02 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2f7269b6773d (authored by ABataev). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80925/new/ https://reviews.llvm.org/D80925 Files: clang/include/clang/Ba

[PATCH] D79972: [OpenMP5.0] map item can be non-contiguous for target update

2020-06-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D79972#2069322 , @cchen wrote: > In D79972#2068976 , @ABataev wrote: > > > Still: Did you think about implementing it in the compiler instead of the > > runtime? > > > I'm not sure I und

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