[PATCH] D50845: [CUDA/OpenMP] Define only some host macros during device compilation

2018-08-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Maybe for device compilation we also should define `__NO_MATH_INLINES` and `__NO_STRING_INLINES` macros to disable inline assembly in glibc? Repository: rC Clang https://reviews.llvm.org/D50845 ___ cfe-commits mailing li

[PATCH] D50845: [CUDA/OpenMP] Define only some host macros during device compilation

2018-08-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In https://reviews.llvm.org/D50845#1202550, @Hahnfeld wrote: > In https://reviews.llvm.org/D50845#1202540, @ABataev wrote: > > > Maybe for device compilation we also should define `__NO_MATH_INLINES` and > > `__NO_STRING_INLINES` macros to disable inline assembly in glib

[PATCH] D50845: [CUDA/OpenMP] Define only some host macros during device compilation

2018-08-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. >> If I understand it correctly, the root cause of this exercise is that we >> want to compile for GPU using plain C. CUDA avoids this issue by separating >> device and host code via target attributes and clang has few special cases >> to ignore inline assembly errors i

[PATCH] D50845: [CUDA/OpenMP] Define only some host macros during device compilation

2018-08-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In https://reviews.llvm.org/D50845#1203961, @Hahnfeld wrote: > In https://reviews.llvm.org/D50845#1202973, @ABataev wrote: > > > > So ideally I think Clang should determine which functions are really > > > `declare target` (either explicit or implicit) and only run seman

[PATCH] D50845: [CUDA/OpenMP] Define only some host macros during device compilation

2018-08-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In https://reviews.llvm.org/D50845#1203973, @Hahnfeld wrote: > In https://reviews.llvm.org/D50845#1203967, @ABataev wrote: > > > In https://reviews.llvm.org/D50845#1203961, @Hahnfeld wrote: > > > > > In https://reviews.llvm.org/D50845#1202973, @ABataev wrote: > > > > > >

[PATCH] D50845: [CUDA/OpenMP] Define only some host macros during device compilation

2018-08-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. > Right, warning wasn't a good thought. We really want strict checking and > would have to error out when we find a function that wasn't implicitly > `declare target` on the host. > I meant to ask how common that would be? If that's only some known functions > we could

[PATCH] D50845: [CUDA/OpenMP] Define only some host macros during device compilation

2018-08-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In https://reviews.llvm.org/D50845#1204216, @Hahnfeld wrote: > In https://reviews.llvm.org/D50845#1204210, @ABataev wrote: > > > > Right, warning wasn't a good thought. We really want strict checking and > > > would have to error out when we find a function that wasn't i

[PATCH] D46667: [OpenCL, OpenMP] Fix crash when OpenMP used in OpenCL file

2018-05-09 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. 1. Is this allowed to use OpenMP for OpenCL programs at all? 2. If it is allowed, I think it would be better to set the TypeSourceInfo for the artificial variable Repository: rC Clang https://reviews.llvm.org/D46667 ___

[PATCH] D46667: [OpenCL, OpenMP] Fix crash when OpenMP used in OpenCL file

2018-05-09 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. BTW, the test itself does not check anything. Repository: rC Clang https://reviews.llvm.org/D46667 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46667: [OpenCL, OpenMP] Fix crash when OpenMP used in OpenCL file

2018-05-10 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In https://reviews.llvm.org/D46667#1094340, @Anastasia wrote: > OpenCL C is based on C99, so OpenMP isn't enabled by default. But in your > tests you use `-fopenmp` to activate it. > > OpenCL general philosophy is that vectors are written explicitly, but it's > not alwa

[PATCH] D46667: [OpenCL, OpenMP] Fix crash when OpenMP used in OpenCL file

2018-05-10 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Sema/SemaDecl.cpp:11348 // initialiser -if (var->getTypeSourceInfo()->getType()->isBlockPointerType() && -!var->hasInit()) { +if (var->getType()->isBlockPointerType() && !var->hasInit()) { Diag(var->getLoc

[PATCH] D46667: [OpenCL, OpenMP] Fix crash when OpenMP used in OpenCL file

2018-05-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: test/SemaOpenCL/with_openmp.cl:1 +// RUN: %clang_cc1 -verify -fopenmp -ast-dump -x cl %s 2>&1 | FileCheck %s +// expected-no-diagnostics Still the same question, do we really want to support full OpenMP for OpenCL or on

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

2018-05-21 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In https://reviews.llvm.org/D45783#1106019, @echristo wrote: > So, I'd really prefer not to set options via the backend option path. From > here I think we should aim to take all of the options we added and having the > asm printer in the backend know how to set them de

[PATCH] D38371: [OpenMP] Initial implementation of teams distribute code generation

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

[PATCH] D38968: [OpenMP] Implement omp_is_initial_device() as builtin

2017-10-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 https://reviews.llvm.org/D38968 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D39136: [OpenMP] Avoid VLAs for some reductions on array sections

2017-10-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 https://reviews.llvm.org/D39136 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D51177: [DEBUGINFO] Add support for emission of the debug directives only.

2018-08-23 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added a reviewer: echristo. Herald added subscribers: JDevlieghere, fedor.sergeev, aprantl. Added option -glineinfo-only to support emission of the debug directives only. It behaves very similar to -gline-tables-only, except that it sets llvm debug info emiss

[PATCH] D51177: [DEBUGINFO] Add support for emission of the debug directives only.

2018-08-27 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In https://reviews.llvm.org/D51177#1213079, @echristo wrote: > Should we just have them mean the same thing and change it based on target? I reused the same debug info level support in clang, but in LLVM they have different processing and I'm not sure that they are abs

[PATCH] D51378: [OPENMP] Add support for nested 'declare target' directives

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

[PATCH] D51331: [OPENMP] Create non-const ident_t structs.

2018-08-28 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. When is ITT Notify used? Does it have some preconditions like debug info, some optimizations level etc.? https://reviews.llvm.org/D51331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

[PATCH] D51331: [OPENMP] Create non-const ident_t structs.

2018-08-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 https://reviews.llvm.org/D51331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D51177: [DEBUGINFO] Add support for emission of the debug directives only.

2018-08-30 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 163353. ABataev added a comment. Address comment from David. Repository: rC Clang https://reviews.llvm.org/D51177 Files: include/clang/Basic/DebugInfoOptions.h include/clang/Driver/Options.td lib/CodeGen/CGDebugInfo.cpp lib/Driver/ToolChains/Clan

[PATCH] D50845: [CUDA/OpenMP] Define only some host macros during device compilation

2018-08-30 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In https://reviews.llvm.org/D50845#1219709, @tra wrote: > FYI. This breaks our CUDA compilation. I haven't figured out what exactly is > wrong yet. I may need to unroll the patch if the fix is not obvious. +1. I think this patch must be reverted, it breaks compilation

[PATCH] D51177: [DEBUGINFO] Add support for emission of the debug directives only.

2018-08-31 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL341212: [DEBUGINFO] Add support for emission of the debug directives only. (authored by ABataev, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D5

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

2018-08-31 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added reviewers: tra, echristo. Herald added subscribers: JDevlieghere, guansong, aprantl. Added support for the -gline-directives-only option + fixed logic of the debug info for CUDA devices. If optimization level is O0, then options --[no-]cuda-noopt-device

[PATCH] D51378: [OPENMP] Add support for nested 'declare target' directives

2018-09-05 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. LG https://reviews.llvm.org/D51378 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2018-09-05 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In https://reviews.llvm.org/D51554#1224049, @echristo wrote: > The change in name here from "line tables" to "directives only" feels a bit > confusing. "Limited" seems to be a bit more clear, or even remaining line > tables only. Can you explain where you were going wi

[PATCH] D52097: [OPENMP] Move OMPClauseReader/Writer classes to ASTReader/Writer - NFC

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

[PATCH] D49510: [OpenMP][Clang] Usability improvements for OpenMP offloading

2018-07-19 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. 1. The new tool definitely requires an RFC at first. 2. The patch is too big and should be split into several small patches Repository: rC Clang https://reviews.llvm.org/D49510 ___ cfe-commits mailing list cfe-commits@lis

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

2018-07-20 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 156575. ABataev added a comment. Added checks for all possible debug options. Repository: rC Clang https://reviews.llvm.org/D49148 Files: include/clang/Basic/DiagnosticDriverKinds.td include/clang/Basic/DiagnosticGroups.td include/clang/Driver/Tool

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

2018-07-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 157563. ABataev added a comment. Address ERic's comments. Repository: rC Clang https://reviews.llvm.org/D49148 Files: include/clang/Basic/DiagnosticDriverKinds.td include/clang/Basic/DiagnosticGroups.td include/clang/Driver/ToolChain.h lib/Driver

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

2018-07-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev marked an inline comment as done. ABataev added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:933-938 + if (TC.supportsDebugInfoOption(A)) { +Action(); +return true; + } + reportUnsupportedDebugInfoOption(A, Args, D, TC.getTriple()); + return fa

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

2018-07-27 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Eric accepted the patch offline. Repository: rC Clang https://reviews.llvm.org/D49148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2018-07-27 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rC338155: [DEBUGINFO] Disable unsupported debug info options for NVPTX target. (authored by ABataev, committed by ). Change

[PATCH] D50218: [OpenMP] Encode offload target triples into comdat key for offload initialization code

2018-08-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:3825 +// this particular combination of offloading targets. +SmallVector RegFnNameParts; +RegFnNameParts.push_back("omp_offloading"); Preallocate the memory for all elements at

[PATCH] D50218: [OpenMP] Encode offload target triples into comdat key for offload initialization code

2018-08-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:3828-3829 +RegFnNameParts[1] = "descriptor_reg"; +for (size_t I = 0; I < Devices.size(); ++I) + RegFnNameParts[I + 2U] = Devices[I].getTriple(); +llvm::sort(RegFnNameParts.begin() + 2, Reg

[PATCH] D50218: [OpenMP] Encode offload target triples into comdat key for offload initialization code

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

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

2018-02-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:436-437 assert(Output.isNothing() && "Invalid output."); - if (Args.hasArg(options::OPT_g_Flag)) + if (mustEmitDebugInfo(Args) == FullDebug) CmdArgs.push_back("-g"); tra wrote

[PATCH] D43026: [OpenMP] Support for implicit "declare target" functions - CodeGen patch

2018-02-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. It is impossible to understand what is going on here. We need to discuss this before even reviewing of this patch. Comment at: lib/CodeGen/CGCXXABI.h:543 + llvm::GlobalVariable *DeclPtr, bool PerformInit, +

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

2018-02-09 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Thanks, will commit it after the commit of the LLVM part Repository: rC Clang https://reviews.llvm.org/D42581 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[PATCH] D43204: [OpenMP] Fix trailing space when printing pragmas

2018-02-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. LG https://reviews.llvm.org/D43204 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D43204: [OpenMP] Fix trailing space when printing pragmas

2018-02-14 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL325145: [OpenMP] Fix trailing space when printing pragmas, by Joel. E. Denny (authored by ABataev, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.

[PATCH] D43204: [OpenMP] Fix trailing space when printing pragmas

2018-02-14 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC325145: [OpenMP] Fix trailing space when printing pragmas, by Joel. E. Denny (authored by ABataev, committed by ). Repository: rC Clang https://reviews.llvm.org/D43204 Files: include/clang/Basic/Att

[PATCH] D43513: [OpenMP] Limit reduction support for pragma 'distribute' when combined with pragma 'simd'

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

[PATCH] D43513: [OpenMP] Limit reduction support for pragma 'distribute' when combined with pragma 'simd'

2018-02-22 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. LG Repository: rC Clang https://reviews.llvm.org/D43513 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D43625: [OpenMP] Remove implicit data sharing code gen that aims to use device shared memory

2018-02-22 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp:564 +llvm::Value *FnArgs[] = {ZeroAddr.getPointer(), ZeroAddr.getPointer()}; +emitCall(CGF, Fn, FnArgs); Pass non-null `SourceLocation` here as the last argument Repositor

[PATCH] D43660: [OpenMP] Add OpenMP data sharing infrastructure using global memory

2018-02-23 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp:555 Work.clear(); + WrapperFunctionsMap.clear(); Do we need this? Comment at: lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp:640-641 + GlobalRecordSizeArg); + aut

[PATCH] D33509: [OpenMP] Create COMDAT group for OpenMP offload registration code to avoid multiple copies

2017-05-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 https://reviews.llvm.org/D33509 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D33735: [DebugInfo] Add ThisOrSelf attribute for emission of FlagObjectPointer.

2017-05-31 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. If the first parameter of the function is the ImplicitParamDecl codegen automatically marks it as an implicit argument with `this` or `self` pointer. To fix this problem Implicit ThisOrSelfAttr is added. This attribute is used to mark real `this` or `self` pointers o

[PATCH] D33735: [DebugInfo] Add ThisOrSelf attribute for emission of FlagObjectPointer.

2017-06-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In https://reviews.llvm.org/D33735#770288, @aaron.ballman wrote: > Can you help me to understand what problem is being solved with this new > attribute? Under what circumstances would the first argument be an > `ImplicitParamDecl` but not an implicit this or self? For

[PATCH] D33735: [DebugInfo] Add ThisOrSelf attribute for emission of FlagObjectPointer.

2017-06-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In https://reviews.llvm.org/D33735#770333, @rjmccall wrote: > In https://reviews.llvm.org/D33735#770318, @aaron.ballman wrote: > > > In https://reviews.llvm.org/D33735#770296, @ABataev wrote: > > > > > In https://reviews.llvm.org/D33735#770288, @aaron.ballman wrote: > > >

[PATCH] D33735: [DebugInfo] Add ThisOrSelf attribute for emission of FlagObjectPointer.

2017-06-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 101199. ABataev added a comment. Updates after review https://reviews.llvm.org/D33735 Files: include/clang/AST/Decl.h lib/AST/Decl.cpp lib/AST/DeclObjC.cpp lib/CodeGen/CGCXXABI.cpp lib/CodeGen/CGDebugInfo.cpp lib/Serialization/ASTReaderDecl.cpp

[PATCH] D33735: [DebugInfo] Add ThisOrSelf attribute for emission of FlagObjectPointer.

2017-06-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 101262. ABataev added a comment. Herald added a subscriber: jholewinski. Added different kinds of ImplicitParamDecl. https://reviews.llvm.org/D33735 Files: include/clang/AST/Decl.h lib/AST/ASTImporter.cpp lib/AST/Decl.cpp lib/AST/DeclObjC.cpp lib/

[PATCH] D33735: [DebugInfo] Add ThisOrSelf attribute for emission of FlagObjectPointer.

2017-06-05 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 101402. ABataev added a comment. Added DeclContext parameter to constructors of ImplicitParamDecl class. https://reviews.llvm.org/D33735 Files: include/clang/AST/Decl.h lib/AST/ASTImporter.cpp lib/AST/Decl.cpp lib/AST/DeclObjC.cpp lib/CodeGen/CGBl

[PATCH] D33735: [DebugInfo] Add ThisOrSelf attribute for emission of FlagObjectPointer.

2017-06-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev marked 7 inline comments as done. ABataev added inline comments. Comment at: include/clang/AST/Decl.h:1387 +IPK_CapturedContext, /// Parameter for captured context +IPK_GeneralParam,/// General implicit parameter + }; rjmccall wrote: > I woul

[PATCH] D33735: [DebugInfo] Add ThisOrSelf attribute for emission of FlagObjectPointer.

2017-06-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 101571. ABataev marked an inline comment as done. ABataev added a comment. Address John comments. https://reviews.llvm.org/D33735 Files: include/clang/AST/Decl.h lib/AST/ASTImporter.cpp lib/AST/Decl.cpp lib/AST/DeclObjC.cpp lib/CodeGen/CGBlocks.cp

[PATCH] D33735: [DebugInfo] Add ThisOrSelf attribute for emission of FlagObjectPointer.

2017-06-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: include/clang/AST/Decl.h:901 +/// member functions. +unsigned ImplicitParamKind : 3; }; aaron.ballman wrote: > It's a bit strange to me that the non-parameter declaration bits now have a > field for implicit

[PATCH] D33735: [DebugInfo] Add ThisOrSelf attribute for emission of FlagObjectPointer.

2017-06-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: include/clang/AST/Decl.h:901 +/// member functions. +unsigned ImplicitParamKind : 3; }; aaron.ballman wrote: > ABataev wrote: > > aaron.ballman wrote: > > > It's a bit strange to me that the non-parameter decl

[PATCH] D33735: [DebugInfo] Add ThisOrSelf attribute for emission of FlagObjectPointer.

2017-06-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 101751. ABataev added a comment. Update after review https://reviews.llvm.org/D33735 Files: include/clang/AST/Decl.h lib/AST/ASTImporter.cpp lib/AST/Decl.cpp lib/AST/DeclObjC.cpp lib/CodeGen/CGBlocks.cpp lib/CodeGen/CGCXXABI.cpp lib/CodeGen/CG

[PATCH] D33735: [DebugInfo] Add ThisOrSelf attribute for emission of FlagObjectPointer.

2017-06-08 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 101908. ABataev added a comment. Removed FIXMEs and corrected comment https://reviews.llvm.org/D33735 Files: include/clang/AST/Decl.h lib/AST/ASTImporter.cpp lib/AST/Decl.cpp lib/AST/DeclObjC.cpp lib/CodeGen/CGBlocks.cpp lib/CodeGen/CGCXXABI.cpp

[PATCH] D33735: [DebugInfo] Add ThisOrSelf attribute for emission of FlagObjectPointer.

2017-06-09 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305075: [DebugInfo] Add kind of ImplicitParamDecl for emission of FlagObjectPointer. (authored by ABataev). Changed prior to commit: https://reviews.llvm.org/D33735?vs=101908&id=102024#toc Repository:

[PATCH] D39457: [OPENMP] Current status of OpenMP support.

2017-12-27 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 128238. ABataev added a comment. Updated status of `target (update|enter data|exit data)` directives. Marked that support for cuda devices is not ready yet. Repository: rC Clang https://reviews.llvm.org/D39457 Files: docs/OpenMPSupport.rst docs/index

[PATCH] D41709: [OpenMP] Initial implementation of code generation for pragma 'target teams distribute parallel for' on host

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

[PATCH] D31417: [OpenMP] Add support for omp simd pragmas without runtime

2018-01-05 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. I think we can abandon this one as support for -fopenmp-simd was committed already? https://reviews.llvm.org/D31417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[PATCH] D39457: [OPENMP] Current status of OpenMP support.

2018-01-08 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rC322018: [OPENMP] Current status of OpenMP support. (authored by ABataev, committed by ). Changed prior to commit: https

[PATCH] D41841: [OpenMP] Fix handling of clause on wrong directive

2018-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. LG https://reviews.llvm.org/D41841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D41841: [OpenMP] Fix handling of clause on wrong directive

2018-01-09 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In https://reviews.llvm.org/D41841#971375, @jdenny wrote: > Alexey: Thanks for accepting. I do not have commit privileges. Would > you please commit for me? Sure https://reviews.llvm.org/D41841 ___ cfe-commits mailing li

[PATCH] D41841: [OpenMP] Fix handling of clause on wrong directive

2018-01-09 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL322107: [OpenMP] Fix handling of clause on wrong directive, by Joel. E. Denny (authored by ABataev, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm

[PATCH] D43852: [OpenMP] Extend NVPTX SPMD implementation of combined constructs

2018-02-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 some nits Comment at: include/clang/Driver/Options.td:1428 +def fopenmp_cuda_mode : Flag<["-"], "fopenmp-cuda-mode">, Group, Flags<[CC1Option, NoArgumentUnused]>;

[PATCH] D43852: [OpenMP] Extend NVPTX SPMD implementation of combined constructs

2018-02-28 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: include/clang/Driver/Options.td:1428 +def fopenmp_cuda_mode : Flag<["-"], "fopenmp-cuda-mode">, Group, Flags<[CC1Option, NoArgumentUnused]>; +def fno_openmp_cuda_mode : Flag<["-"], "fno-openmp-cuda-mode">, Group, Flags<[NoArgumentUnuse

[PATCH] D43660: [OpenMP] Add OpenMP data sharing infrastructure using global memory

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

[PATCH] D43625: [OpenMP] Remove implicit data sharing code gen that aims to use device shared memory

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

[PATCH] D43197: [OpenMP] Add flag for linking runtime bitcode library

2018-03-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:535 +SmallVector LibraryPaths; +if (char *env = ::getenv("LIBRARY_PATH")) { + StringRef CompilerPath = env; 1. `char *`->`const char *` 2. `::getenv`->`llvm::Process::GetEnv`

[PATCH] D43197: [OpenMP] Add flag for linking runtime bitcode library

2018-03-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:591 +llvm::sys::path::append(DefaultLibPath, "lib" CLANG_LIBDIR_SUFFIX); +LibraryPaths.emplace_back(DriverArgs.MakeArgString(DefaultLibPath)); + Maybe just `LibraryPaths.emplace_bac

[PATCH] D43197: [OpenMP] Add flag for linking runtime bitcode library

2018-03-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: include/clang/Basic/DiagnosticDriverKinds.td:207-208 +def remark_drv_omp_offload_target_missingbcruntime : Warning< + "Expect degraded performance on the target device due to missing '%0' in LIBRARY_PATH.">, + InGroup; def err_drv_bi

[PATCH] D43660: [OpenMP] Add OpenMP data sharing infrastructure using global memory

2018-03-08 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. LG Repository: rC Clang https://reviews.llvm.org/D43660 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D43197: [OpenMP] Add flag for linking runtime bitcode library

2018-03-09 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:592 +Twine("lib") + CLANG_LIBDIR_SUFFIX); +LibraryPaths.emplace_back(DefaultLibPath.c_str()); + Do you still need `.c_str()` here? Comment at: test/Driver/ope

[PATCH] D43197: [OpenMP] Add flag for linking runtime bitcode library

2018-03-13 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:595-596 +// Add user defined library paths from LIBRARY_PATH. +if (llvm::Optional LibPath = + llvm::sys::Process::GetEnv("LIBRARY_PATH")) { + SmallVector Frags; Move t

[PATCH] D43197: [OpenMP] Add flag for linking runtime bitcode library

2018-03-13 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. LG Repository: rC Clang https://reviews.llvm.org/D43197 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44541: [OpenMP][Clang] Move device global stack init before master-workers split

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

[PATCH] D44588: [OpenMP][Clang] Pass global thread ID to outlined function

2018-03-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. Tests? Repository: rC Clang https://reviews.llvm.org/D44588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

[PATCH] D47849: [OpenMP][Clang][NVPTX] Enable math functions called in an OpenMP NVPTX target device region to be resolved as device-native function calls

2018-06-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Add tests for C++ and move OpenMP specific tests to OpenMP directory Comment at: lib/Headers/__clang_cuda_device_functions.h:28 +#if defined(_OPENMP) +#include <__clang_cuda_libdevice_declares.h> +#include Do we really need to include

[PATCH] D53079: [OPENMP] Add 'dynamic_allocators' clause to OMP5.0 'requires' directive

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

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

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

[PATCH] D53395: [OPENMP] Move OMPClausePrinter to OpenMPClause.h/OpenMPClause.cpp - NFC

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

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

2018-10-19 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntimeNVPTX.h:350 void getDefaultScheduleAndChunk(CodeGenFunction &CGF, - const OMPLoopDirective &S, OpenMPScheduleClauseKind &ScheduleKind, + const OMPLoopDirective &S, OpenMPScheduleTy &ScheduleKind,

[PATCH] D53513: [OPENMP] Add support for 'atomic_default_mem_order' clause on requires directive

2018-10-22 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Check the code formatting, please. There should be lines longer than 80 symbols. Comment at: clang/include/clang/AST/OpenMPClause.h:886 + /// \param K Kind of clause. + void setAtomicDefaultMemOrderKind(OpenMPAtomicDefaultMemOrderClauseKind K) { +

[PATCH] D53513: [OPENMP] Add support for 'atomic_default_mem_order' clause on requires directive

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

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

2018-10-24 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: libomptarget/deviceRTLs/nvptx/src/data_sharing.cu:389 unsigned WID = getWarpId(); + // void * volatile FramePointer = 0; void *&FrameP = DataSharingState.FramePtr[WID]; This must be removed Comm

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

2018-10-24 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. What about tests? Repository: rC Clang https://reviews.llvm.org/D53443 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D53448: [OpenMP][NVPTX] Use single loops when generating code for distribute parallel for

2018-10-24 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.h:904 + /// + virtual bool isStaticChunked(OpenMPDistScheduleClauseKind ScheduleKind, + bool Chunked) const; I'd rename this into `isDistStaticChunked` ==

[PATCH] D53636: Do not always request an implicit taskgroup region inside the kmpc_taskloop function

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

[PATCH] D53636: Do not always request an implicit taskgroup region inside the kmpc_taskloop function

2018-10-24 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In https://reviews.llvm.org/D53636#1274673, @smateo wrote: > Hi Alexey, > > Thanks for the prompt review! > > I don't have commit access yet, do you mind to commit it for me? > > Thanks! Sure, no problems, thanks for the patch! Repository: rC Clang https://reviews.

[PATCH] D53636: Do not always request an implicit taskgroup region inside the kmpc_taskloop function

2018-10-24 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC345180: Do not always request an implicit taskgroup region inside the kmpc_taskloop… (authored by ABataev, committed by ). Repository: rC Clang https://reviews.llvm.org/D53636 Files: lib/CodeGen/CGO

[PATCH] D53448: [OpenMP][NVPTX] Use single loops when generating code for distribute parallel for

2018-10-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.h:904 + /// + virtual bool isStaticChunked(OpenMPDistScheduleClauseKind ScheduleKind, + bool Chunked) const; gtbercea wrote: > ABataev wrote: > > I'd rename thi

[PATCH] D53448: [OpenMP][NVPTX] Use single loops when generating code for distribute parallel for

2018-10-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. What about collapsed loops? Comment at: lib/CodeGen/CGStmtOpenMP.cpp:3390 // UB = min(UB, GlobalUB); -EmitIgnoredExpr(isOpenMPLoopBoundSharingDirective(S.getDirectiveKind()) +EmitIgnoredExpr(StaticChunked || +

[PATCH] D53448: [OpenMP][NVPTX] Use single loops when generating code for distribute parallel for

2018-10-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: test/OpenMP/distribute_parallel_for_codegen.cpp:410 // LAMBDA-DAG: [[OMP_IV:%.omp.iv]] = alloca + // LAMBDA-DAG: [[OMP_CAPT_EXPR:%.capture_expr.1]] = alloca // LAMBDA-DAG: [[OMP_LB:%.omp.comb.lb]] = alloca

[PATCH] D53448: [OpenMP][NVPTX] Use single loops when generating code for distribute parallel for

2018-10-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, with a nit Comment at: lib/Sema/SemaOpenMP.cpp:5308 + +// Build IV <= PrevEUB to be used in parallel for is in combination with +// a distribute directive with

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

2018-10-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: test/OpenMP/nvptx_parallel_for_codegen.cpp:44 +// CHECK: call void @__kmpc_kernel_prepare_parallel( +// CHECK: call void @__kmpc_begin_sharing_variables(i8*** %shared_arg_refs, i64 2) +// CHECK: call void @llvm.nvvm.barrier0() -

[PATCH] D53772: [NFC][OpenMP] Add new test for parallel for code generation.

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

  1   2   3   4   5   6   7   8   9   10   >