[PATCH] D81658: [OPENMP50]Codegen for scan directive in for simd regions.

2020-06-11 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 scan directives in parallel for regions. Emits the code for the directive with inscan reductions. Original code: #pragma o

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

2020-06-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:7327-7330 + bool IsNonContiguous = false, + MapNonContiguousArrayTy *const Offsets = nullptr, + MapNonContiguousArrayTy *const Counts = nullptr, + MapNonContiguousArrayTy *const S

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

2020-06-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:7831-7838 + llvm::Value *SizeV = nullptr; + if (CAT) { +llvm::APInt Size = CAT->getSize(); +SizeV = llvm::ConstantInt::get(CGF.SizeTy, Size); + } el

[PATCH] D81881: [OPENMP]Fix overflow during counting the number of iterations.

2020-06-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D81881#2094062 , @jdoerfert wrote: > So the idea is to do the trip count computation with defined overflow > behavior, e.g., without `nsw/nuw` in IR, right? Not quite. If we can predict that there is no overflow, everything r

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

2020-06-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:7834 +llvm::APInt Size = CAT->getSize(); +SizeV = llvm::ConstantInt::get(CGF.SizeTy, Size); + } else if (VAT) { cchen wrote: > ABataev wrote: > > cch

[PATCH] D81658: [OPENMP50]Codegen for scan directive in for simd regions.

2020-06-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 271098. ABataev added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81658/new/ https://reviews.llvm.org/D81658 Files: clang/lib/CodeGen/CGStmtOpenMP.cpp clang/test/OpenMP/for_simd_scan_co

[PATCH] D81478: [OPENMP50]Codegen for scan directives in parallel for regions.

2020-06-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 271115. ABataev added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81478/new/ https://reviews.llvm.org/D81478 Files: clang/lib/CodeGen/CGStmtOpenMP.cpp clang/test/OpenMP/parallel_for_sca

[PATCH] D81951: [OPENMP]Fix PR46347: several ordered directives in a single region.

2020-06-16 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. According to OpenMP, During execution of an iteration of a worksharing-loop or a loop nest within a worksharing-loop, simd, or worksharing-loop

[PATCH] D81478: [OPENMP50]Codegen for scan directives in parallel for regions.

2020-06-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev marked an inline comment as done. ABataev added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:3627 + emitScanBasedDirective(CGF, S, NumIteratorsGen, FirstGen, SecondGen); +} else { + OMPCancelStackRAII CancelRegion(CGF, OMPD_parallel_for, S

[PATCH] D81951: [OPENMP]Fix PR46347: several ordered directives in a single region.

2020-06-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D81951#2096397 , @jdoerfert wrote: > LGTM, can you add the nested ordered + depend test case too, assuming we > don't have it. We have such tests in ordered_ast_print.cpp and ordered_codegen.cpp tests Repository: rG LLVM

[PATCH] D81951: [OPENMP]Fix PR46347: several ordered directives in a single region.

2020-06-16 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3488e8c21cec: [OPENMP]Fix PR46347: several ordered directives in a single region. (authored by ABataev). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81951/

[PATCH] D81658: [OPENMP50]Codegen for scan directive in for simd regions.

2020-06-16 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6e78a3086a7f: [OPENMP50]Codegen for scan directive in for simd regions. (authored by ABataev). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81658/new/ http

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

2020-06-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:7927 + CurStrides.push_back(CurStride); + DI++; +} Use preincrement Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:8243 +I

[PATCH] D81478: [OPENMP50]Codegen for scan directives in parallel for regions.

2020-06-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev marked an inline comment as done. ABataev added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:3627 + emitScanBasedDirective(CGF, S, NumIteratorsGen, FirstGen, SecondGen); +} else { + OMPCancelStackRAII CancelRegion(CGF, OMPD_parallel_for, S

[PATCH] D81098: [OpenMP] Upgrade default version of OpenMP to 5.0

2020-06-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Looks good. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81098/new/ https://reviews.llvm.org/D81098 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[PATCH] D82019: [OPENMP]Fix PR46357: Do not allow types declarations in pragmas.

2020-06-17 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. Compiler may erroneously treat current context in OpenMP pragmas as the context where new type declaration/definition is allowed. But the declart

[PATCH] D82026: [OPENMP50]Allow nonmonotonic modifier for all schedule kinds.

2020-06-17 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. According to OpenMP 5.0, nonmonotonic modifier can be used with all schedule kinds, not only dynamic and guided as in OpenMP 4.5. Repository:

[PATCH] D81478: [OPENMP50]Codegen for scan directives in parallel for regions.

2020-06-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev marked an inline comment as done. ABataev added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:3627 + emitScanBasedDirective(CGF, S, NumIteratorsGen, FirstGen, SecondGen); +} else { + OMPCancelStackRAII CancelRegion(CGF, OMPD_parallel_for, S

[PATCH] D82019: [OPENMP]Fix PR46357: Do not allow types declarations in pragmas.

2020-06-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D82019#2098509 , @jdoerfert wrote: > Hm, does the standard say this is not allowed? I can see that we don't want > it but I'm not 100% certain here. It does not say anything specific, but I don't think it is a good idea to d

[PATCH] D81478: [OPENMP50]Codegen for scan directives in parallel for regions.

2020-06-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 271437. ABataev added a comment. Rebase + avoid copy paste. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81478/new/ https://reviews.llvm.org/D81478 Files: clang/lib/CodeGen/CGStmtOpenMP.cpp clang/test/Ope

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

2020-07-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D79972#2124108 , @cchen wrote: > @ABataev , I'm considering emitting an extra dimension for a non-contiguous > descriptor to support stride in this patch (stride = 1 in array section is > just a special case for computing stri

[PATCH] D76342: [OpenMP] Implement '#pragma omp tile'

2020-07-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D76342#2128739 , @Meinersbur wrote: > ping > > @ABataev Have you checked the alternative scheme? Working on it, need a little bit more time. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.

[PATCH] D82800: [OPENMP50] extend array section for stride (Parsing/Sema/AST)

2020-07-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Parse/ParseExpr.cpp:1928-1930 if (Tok.isNot(tok::r_square)) -Length = ParseExpression(); +if (getLangOpts().OpenMP < 50 || +((Tok.isNot(tok::colon) && getLangOpts().OpenMP >= 5

[PATCH] D82800: [OPENMP50] extend array section for stride (Parsing/Sema/AST)

2020-07-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Parse/ParseExpr.cpp:1933 } +if (getLangOpts().OpenMP >= 50 && Tok.is(tok::colon)) { + // Consume ':' Seems to me, it is too broad. According to the standard, it must be allowed only i

[PATCH] D82800: [OPENMP50] extend array section for stride (Parsing/Sema/AST)

2020-07-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Parse/ParseExpr.cpp:1933 } +if (getLangOpts().OpenMP >= 50 && Tok.is(tok::colon)) { + // Consume ':' cchen wrote: > cchen wrote: > > ABataev wrote: > > > Seems to me, it is too broad.

[PATCH] D82800: [OPENMP50] extend array section for stride (Parsing/Sema/AST)

2020-07-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Parse/ParseExpr.cpp:1944-1951 + if (StrideExpr && !StrideExpr->isValueDependent() && + (!StrideExpr->isEvaluatable(Actions.getASTContext()) || + (StrideExpr->EvaluateAsInt(Result,

[PATCH] D75591: [OpenMP] Add firstprivate as a default data-sharing attribute to clang

2020-07-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D75591#2134301 , @atmnpatel wrote: > Ping @ABataev. Rebase, please Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75591/new/ https://reviews.llvm.org/D75591 _

[PATCH] D83268: [OpenMP][NFC] Remove unused (always fixed) arguments

2020-07-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D83268#2135081 , @Hahnfeld wrote: > This is definitely not NFC and breaks API compatibility (but apparently > nobody cares anymore?). +1. Better to introduce new entry points and mark these ones as deprecated. Repository:

[PATCH] D83268: [OpenMP][NFC] Remove unused (always fixed) arguments

2020-07-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D83268#2135724 , @jdoerfert wrote: > In D83268#2135081 , @Hahnfeld wrote: > > > This is definitely not NFC and breaks API compatibility (but apparently > > nobody cares anymore?). > > >

[PATCH] D83268: [OpenMP][NFC] Remove unused (always fixed) arguments

2020-07-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp:42 - /// *outlined_function, int16_t - /// IsOMPRuntimeInitialized); OMPRTL_NVPTX__kmpc_kernel_prepare_parallel, I think, instead the optimizer can try to detect if the run

[PATCH] D83268: [OpenMP][NFC] Remove unused (always fixed) arguments

2020-07-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D83268#2135930 , @JonChesterfield wrote: > Aside from the API stability concern this looks uncontentious. Removes dead > arguments, generally makes things simpler. Thus LGTM. > > @Hahnfeld @ABataev - are you sufficiently persu

[PATCH] D83268: [OpenMP][NFC] Remove unused (always fixed) arguments

2020-07-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D83268#2135955 , @jdoerfert wrote: > > Especially taking into account, that libomp can be built separately. > > This is *not* affecting libomp in any way. libomptarget and device runtimes are part of libomp. If you're going to

[PATCH] D83268: [OpenMP][NFC] Remove unused (always fixed) arguments

2020-07-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D83268#2135954 , @JonChesterfield wrote: > In D83268#2135938 , @ABataev wrote: > > > > @Hahnfeld @ABataev - are you sufficiently persuaded that preserving the > > > current interface is

[PATCH] D83268: [OpenMP][NFC] Remove unused (always fixed) arguments

2020-07-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D83268#2136021 , @jdoerfert wrote: > In D83268#2135988 , @ABataev wrote: > > > In D83268#2135955 , @jdoerfert > > wrote: > > > > > > Especially t

[PATCH] D83268: [OpenMP][NFC] Remove unused (always fixed) arguments

2020-07-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D83268#2135951 , @jdoerfert wrote: > > I don't think gcc can be using this runtime library for nvptx. > > Yes, and: We are (going to) use clang specific intrinsics to avoid CUDA > (soon). > > > Use of the new library with the p

[PATCH] D83268: [OpenMP][NFC] Remove unused (always fixed) arguments

2020-07-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D83268#2136054 , @jdoerfert wrote: > In D83268#2136029 , @ABataev wrote: > > > `llvm-project/openmp/libomptarget` > > > Please use more words. libomptarget is part of libomp Repositor

[PATCH] D83268: [OpenMP][NFC] Remove unused (always fixed) arguments

2020-07-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D83268#2136049 , @jdoerfert wrote: > In D83268#2136031 , @ABataev wrote: > > > There is still compatibility between clang10 and clang11. Or they are > > incompatible in LLVM IR level? >

[PATCH] D75591: [OpenMP] Add firstprivate as a default data-sharing attribute to clang

2020-07-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. LGTM with a nit. Comment at: clang/lib/Parse/ParseOpenMP.cpp:2787 + if (getLangOpts().OpenMP < 51 && Kind == OMPC_default && + static_cast(Val.getValue().Type) == + OMP_DEFAULT_firstprivate) { -

[PATCH] D82800: [OPENMP50] extend array section for stride (Parsing/Sema/AST)

2020-07-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Parse/ParseExpr.cpp:1933 } +if (getLangOpts().OpenMP >= 50 && Tok.is(tok::colon)) { + // Consume ':' You need to insert an additional check for `OMPClauseKind == llvm::omp::Clause::OM

[PATCH] D75591: [OpenMP] Add firstprivate as a default data-sharing attribute to clang

2020-07-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Parse/ParseOpenMP.cpp:2787 + if (getLangOpts().OpenMP < 51 && Kind == OMPC_default && + static_cast(Val.getValue().Type) == + OMP_DEFAULT_firstprivate) { atmnpatel wrote: > ABataev wrote: > > ABa

[PATCH] D75591: [OpenMP] Add firstprivate as a default data-sharing attribute to clang

2020-07-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Parse/ParseOpenMP.cpp:2787 + if (getLangOpts().OpenMP < 51 && Kind == OMPC_default && + static_cast(Val.getValue().Type) == + OMP_DEFAULT_firstprivate) { atmnpatel wrote: > ABataev wrote: > > atm

[PATCH] D83334: [OPENMP]Fix PR46593: Reduction initializer missing construnctor call.

2020-07-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added a reviewer: jdoerfert. Herald added subscribers: guansong, yaxunl. Herald added a project: clang. If user-defined reductions with the initializer are used with classes, wthe compiler misses the constructor call whe trying to create a private copy of the

[PATCH] D82800: [OPENMP50] extend array section for stride (Parsing/Sema/AST)

2020-07-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Parse/ParseExpr.cpp:1933 } +if (getLangOpts().OpenMP >= 50 && Tok.is(tok::colon)) { + // Consume ':' cchen wrote: > cchen wrote: > > ABataev wrote: > > > You need to insert an addition

[PATCH] D83398: [OPENMP50]Perform data mapping analysis only for explicitly mapped data.

2020-07-08 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. According to OpenMP 5.0, the restrictions for mapping of overlapped data apply only for explicitly mapped data, there is no restriction for impli

[PATCH] D82800: [OPENMP50] extend array section for stride (Parsing/Sema/AST)

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

[PATCH] D83478: [OPENMP]Fix compiler crash for target data directive without actual target codegen.

2020-07-09 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. Need to privatize addresses of the captured variables when trying to emit the body of the target data directive in no target codegen mode. Repo

[PATCH] D82800: [OPENMP50] extend array section for stride (Parsing/Sema/AST)

2020-07-09 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D82800#2141818 , @cchen wrote: > @ABataev , can you commit this patch for me when you have time? Thanks. I think you can request commit access from Chris Lattner and commit it yourself. Repository: rG LLVM Github Monorepo

[PATCH] D83478: [OPENMP]Fix compiler crash for target data directive without actual target codegen.

2020-07-13 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7075c056e91b: [OPENMP]Fix compiler crash for target data directive without actual target… (authored by ABataev). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D83398: [OPENMP50]Perform data mapping analysis only for explicitly mapped data.

2020-07-13 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 277446. ABataev added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83398/new/ https://reviews.llvm.org/D83398 Files: clang/lib/Sema/SemaOpenMP.cpp clang/test/OpenMP/target_map_messages.c

[PATCH] D83334: [OPENMP]Fix PR46593: Reduction initializer missing construnctor call.

2020-07-13 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 277448. ABataev added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83334/new/ https://reviews.llvm.org/D83334 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp clang/lib/Sema/SemaOpenMP.cpp

[PATCH] D83696: [OPENMP]Fix PR46688: cast the type of the allocated variable to the initial one.

2020-07-13 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added a reviewer: jdoerfert. Herald added subscribers: guansong, yaxunl, jholewinski. Herald added a project: clang. If the original variable is marked for allocation in the different address space using #pragma omp allocate, need to cast the allocated variab

[PATCH] D83723: [OpenMP] Generalize CGOpenMPRuntimeNVPTX as CGOpenMPRuntimeGPU

2020-07-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntimeAMDGCN.cpp:39 + // return constant compile-time target-specific warp size + unsigned WarpSize = CGF.getTarget().getGridValue(llvm::omp::GV_Warp_Size); + return Bld.getInt32(WarpSize);

[PATCH] D83723: [OpenMP][NFC] Generalize CGOpenMPRuntimeNVPTX as CGOpenMPRuntimeGPU

2020-07-14 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 meant to remove just the new virtual function and its new implementation for AMDGCN, you could keep the new class for AMD GPUs. But I'm fine with this too. Repository: rG LLVM Github Mo

[PATCH] D81508: [PowerPC] Add __vector_pair and __vector_quad types

2020-07-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:160 + // which is 256 and 512 bytes - way over aligned. + bool IsCPUP10OrNewer = CPU == "pwr10" || CPU == "power10" || CPU == "future"; + if (IsCPUP10OrNewer && StringSwitc

[PATCH] D67833: [OpenMP 5.0] Codegen support to pass user-defined mapper functions to runtime

2020-07-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D67833#2151501 , @lildmh wrote: > I'll update the diff and please check and accept after that Ok CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67833/new/ https://reviews.llvm.org/D67833 __

[PATCH] D82575: [OpenMP] OpenMP Clang tests without 50 version string after upgrading to 5.0

2020-07-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Check that default tests have additional -fopenmp-version=45 flag since they are expected to be executed in OpenMP 4.5 mode. Comment at: clang/test/OpenMP/declare_target_ast_print.cpp:5-7 +// RUN: %clang_cc1 -verify -fopenmp -I %S/Inputs -ast-print %s

[PATCH] D83863: [OpenMP] Change version 4.5 hardcoded clang tests to default OpenMP version

2020-07-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Not sure that this is really required. If we want to check for the default version, it would be good to check that it still works for 4.5. It means, need to add additional RUN lines. But I don't think it is profitable to test the same functionality several times without

[PATCH] D83863: [OpenMP] Change version 4.5 hardcoded clang tests to default OpenMP version

2020-07-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D83863#2153021 , @saiislam wrote: > In D83863#2153008 , @ABataev wrote: > > > Not sure that this is really required. If we want to check for the default > > version, it would be good to

[PATCH] D83863: [OpenMP] Change version 4.5 hardcoded clang tests to default OpenMP version

2020-07-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/test/OpenMP/parallel_default_messages.cpp:7-8 // RUN: %clang_cc1 -verify -fopenmp-version=30 -fopenmp -ferror-limit 100 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify=expected,ge40 -fopenmp -ferror-limit 100 -o - %s -Wunini

[PATCH] D83696: [OPENMP]Fix PR46688: cast the type of the allocated variable to the initial one.

2020-07-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D83696#2153258 , @jdoerfert wrote: > LGTM. We might need to pick this for 11. Yes, just like the fix for user-defined reduction from https://reviews.llvm.org/D83334 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D83061: [OpenMP] Implement TR8 `present` map type modifier in Clang (1/2)

2020-07-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:9566 +MEHandler.generateAllInfo(BasePointers, Pointers, Sizes, MapTypes, + CapturedVarSet, /*PresentModifierOnly=*/true); jdenny wrote: > In today'

[PATCH] D83061: [OpenMP] Implement TR8 `present` map type modifier in Clang (1/2)

2020-07-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:9566 +MEHandler.generateAllInfo(BasePointers, Pointers, Sizes, MapTypes, + CapturedVarSet, /*PresentModifierOnly=*/true); jdenny wrote: > ABataev w

[PATCH] D83696: [OPENMP]Fix PR46688: cast the type of the allocated variable to the initial one.

2020-07-15 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9dc327d1b746: [OPENMP]Fix PR46688: cast the type of the allocated variable to the initial one. (authored by ABataev). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D83334: [OPENMP]Fix PR46593: Reduction initializer missing construnctor call.

2020-07-15 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG41d0af00740a: [OPENMP]Fix PR46593: Reduction initializer missing construnctor call. (authored by ABataev). Changed prior to commit: https://reviews.llvm.org/D83334?vs=277448&id=278276#toc Repository:

[PATCH] D83398: [OPENMP50]Perform data mapping analysis only for explicitly mapped data.

2020-07-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 278284. ABataev added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83398/new/ https://reviews.llvm.org/D83398 Files: clang/lib/Sema/SemaOpenMP.cpp clang/test/OpenMP/target_map_messages.c

[PATCH] D67833: [OpenMP 5.0] Codegen support to pass user-defined mapper functions to runtime

2020-07-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/D67833/new/ https://reviews.llvm.org/D67833 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D83061: [OpenMP] Implement TR8 `present` map type modifier in Clang (1/2)

2020-07-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:9566 +MEHandler.generateAllInfo(BasePointers, Pointers, Sizes, MapTypes, + CapturedVarSet, /*PresentModifierOnly=*/true); jdenny wrote: > ABataev w

[PATCH] D83909: [OPENMP] Fix PR46730: Fix compiler crash on taskloop over constructible loop counters.

2020-07-15 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 variable is constrcutible, its copy is created by calling a constructor. Such variables are duplicated and thus, must be captured. Repos

[PATCH] D81478: [OPENMP50]Codegen for scan directives in parallel for regions.

2020-06-18 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1ec469cf4c20: [OPENMP50]Codegen for scan directives in parallel for regions. (authored by ABataev). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81478/new/

[PATCH] D82026: [OPENMP50]Allow nonmonotonic modifier for all schedule kinds.

2020-06-18 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4971d0b8ec6e: [OPENMP50]Allow nonmonotonic modifier for all schedule kinds. (authored by ABataev). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82026/new/

[PATCH] D82019: [OPENMP]Fix PR46357: Do not allow types declarations in pragmas.

2020-06-18 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG437cbad3b35c: [OPENMP]Fix PR46357: Do not allow types declarations in pragmas. (authored by ABataev). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82019/new

[PATCH] D82115: [OPENMP50]Codegen for scan directives in parallel for simd regions.

2020-06-18 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 scan directives in parallel for simd regions. Emits the code for the directive with inscan reductions. Original code: #pra

[PATCH] D82324: [OPENMP]Dynamic globalization for parallel target regions.

2020-06-22 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added a reviewer: jdoerfert. Herald added subscribers: sstefan1, guansong, yaxunl, jholewinski. Herald added a project: clang. Added support for dynamic memory allocation for globalized variables in case if execution of target regions in parallel is required.

[PATCH] D76342: [OpenMP] Implement '#pragma omp tile'

2020-06-22 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/AST/StmtOpenMP.h:4781-4784 +/// This represents the '#pragma omp tile' loop transformation directive. +class OMPTileDirective final +: public OMPLoopDirective, + private llvm::TrailingObjects { --

[PATCH] D82115: [OPENMP50]Codegen for scan directives in parallel for simd regions.

2020-06-23 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcb90e6a7c0af: [OPENMP50]Codegen for scan directives in parallel for simd regions. (authored by ABataev). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82115/

[PATCH] D76342: [OpenMP] Implement '#pragma omp tile'

2020-06-24 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/AST/StmtOpenMP.h:4781-4784 +/// This represents the '#pragma omp tile' loop transformation directive. +class OMPTileDirective final +: public OMPLoopDirective, + private llvm::TrailingObjects { --

[PATCH] D76342: [OpenMP] Implement '#pragma omp tile'

2020-06-24 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/AST/StmtOpenMP.h:4781-4784 +/// This represents the '#pragma omp tile' loop transformation directive. +class OMPTileDirective final +: public OMPLoopDirective, + private llvm::TrailingObjects { --

[PATCH] D82324: [OPENMP]Dynamic globalization for parallel target regions.

2020-06-24 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D82324#2111953 , @jdoerfert wrote: > I do not understand why we need the flag. As far as I can tell, it has to be > on to support the standard described behavior, right? Why should we (allow > to) turn it off? It might use "

[PATCH] D81098: [OpenMP] Upgrade default version of OpenMP to 5.0

2020-06-24 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/D81098/new/ https://reviews.llvm.org/D81098 ___

[PATCH] D82324: [OPENMP]Dynamic globalization for parallel target regions.

2020-06-24 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev marked an inline comment as done. ABataev added a comment. In D82324#2112388 , @jdoerfert wrote: > Let me rephrase. Does the user needs to request the fast path or the user > needs to request the slow but correct path? Only the former is acceptabl

[PATCH] D82324: [OPENMP]Dynamic globalization for parallel target regions.

2020-06-25 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG32ea3397bec8: [OPENMP]Dynamic globalization for parallel target regions. (authored by ABataev). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82324/new/ htt

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

2020-06-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:7849-7851 +if (&Component != &*Components.begin()) { + ElementType = ElementType->getPointeeOrArrayElementType(); +} No need for braces here ==

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

2020-06-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:8781 MappableExprsHandler::MapFlagsArrayTy &MapTypes, - CGOpenMPRuntime::TargetDataInfo &Info) { + MappableExprsHandler::MapDimArrayTy &D

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

2020-06-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:16624 + if (IsPointer && !AllowAnotherPtr) +SemaRef.Diag(ELoc, diag::err_omp_section_length_undefined) << true; + else cchen wrote: > ABataev wrote: > > Better to use integ

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

2020-06-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:10334-10335 +MCHandler.generateAllInfo(BasePointers, Pointers, Sizes, MapTypes, + Info.Dims, Info.Offsets, Info.Counts, + Info.Strides);

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

2020-06-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:16665 // Record the component - we don't have any declaration associated. -Components.emplace_back(OASE, nullptr); +Components.emplace_back(OASE, nullptr, false); return RelevantExpr || Vis

[PATCH] D82800: [OPENMP50] extend array section for stride (Parsing/Sema/AST)

2020-06-29 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:7893-7897 +llvm::errs() << "DEBUG in CGOpenMPRuntime.cpp\n"; +OASE->getLowerBound()->dump(); +OASE->getLength()->dump(); +OASE->getStride()->dump(); +

[PATCH] D82800: [OPENMP50] extend array section for stride (Parsing/Sema/AST)

2020-06-29 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:4907 + if (Stride) { +auto Res = +PerformOpenMPImplicitIntegerConversion(Stride->getExprLoc(), Stride); cchen wrote: > ABataev wrote: > > `auto`->`ExprResult` > Should I also chan

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

2020-06-30 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a subscriber: kkwli0. ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:7046-7049 +/// Signal that the runtime library should use args as an array of +/// descriptor_dim pointers and use args_size as dims. Used when we have +

[PATCH] D75591: [OpenMP] Add firstprivate as a default data-sharing attribute to clang

2020-04-21 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:3211-3213 + VD->getStorageClass() == SC_Static && + (CanonicalVD->getDeclContext()->isNamespace() || + !VD->isLocalVarDeclOrParm())) { atmnpatel wrote: > ABataev

[PATCH] D75591: [OpenMP] Add firstprivate as a default data-sharing attribute to clang

2020-04-21 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:3211-3213 + VD->getStorageClass() == SC_Static && + (CanonicalVD->getDeclContext()->isNamespace() || + !VD->isLocalVarDeclOrParm())) { atmnpatel wrote: > ABataev

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

2020-04-22 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 259270. ABataev added a comment. ddress comments 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/OpenMPClause.h clang/include/clang/A

[PATCH] D78637: [OPENMP]Fix PR45383: type dependent array subscripts are diagnosed erroneously.

2020-04-22 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added a reviewer: jdoerfert. Herald added subscribers: guansong, yaxunl. Herald added a project: clang. If the array subscript expression is type depent, its analysis must be delayed before its instantiation. Repository: rG LLVM Github Monorepo https://r

[PATCH] D78643: [OpenMP] Fix false error report of array subscription for templated indexes.

2020-04-22 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D78643#1997344 , @jdoerfert wrote: > This looks reasonable to me. @ABataev WDYT? I would add a positive test with -ast-print Comment at: clang/lib/Sema/SemaOpenMP.cpp:15913 +if (auto *ASE = dyn_cast

[PATCH] D78941: [OPENMP]Allow cancellation constructs in target parallel regions.

2020-04-27 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added a reviewer: jdoerfert. Herald added subscribers: guansong, yaxunl. Herald added a project: clang. omp cancellation point parallel and omp cancel parallel directives are allowed in target paralle regions. Repository: rG LLVM Github Monorepo https://

[PATCH] D79186: [OPENMP]Consider 'omp_null_allocator' as a predefined allocator.

2020-04-30 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added a reviewer: jdoerfert. Herald added subscribers: guansong, yaxunl, jholewinski. Herald added a project: clang. omp.h header file defines omp_null_allocator as a predefined allocator, need to consider it also as a predefined allocator. Repository: rG

[PATCH] D78941: [OPENMP]Allow cancellation constructs in target parallel regions.

2020-04-30 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb737b814feea: [OPENMP]Allow cancellation constructs in target parallel regions. (authored by ABataev). Changed prior to commit: https://reviews.llvm.org/D78941?vs=260355&id=261317#toc Repository: rG

[PATCH] D78577: [OPENMP50]Basic support for uses_allocators clause.

2020-04-30 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev marked 5 inline comments as done. ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:18614 + if (DRE) +IsPredefinedAllocator = PredefinedAllocators.count(DRE->getDecl()); + if (!DRE || jdoerfert wrote: > Nit: I gues

[PATCH] D79186: [OPENMP]Consider 'omp_null_allocator' as a predefined allocator.

2020-04-30 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D79186#2013603 , @jdoerfert wrote: > What would you think about moving the allocator definitions to OMPKinds.def > instead of listing them explicitly? As far as I can tell we really only > distinguish between predefined and us

[PATCH] D79186: [OPENMP]Consider 'omp_null_allocator' as a predefined allocator.

2020-05-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 261513. ABataev added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79186/new/ https://reviews.llvm.org/D79186 Files: clang/include/clang/Basic/Attr.td clang/lib/CodeGen/CGOpenMPRuntime.c

<    3   4   5   6   7   8   9   10   11   12   >