Re: [PATCH] D11361: [OpenMP] Target directive host codegen

2015-09-15 Thread Samuel Antao via cfe-commits
sfantao abandoned this revision. sfantao added a comment. Closing revision. It has been replaced by http://reviews.llvm.org/D12871 has suggested by John. Thanks! Samuel http://reviews.llvm.org/D11361 ___ cfe-commits mailing list cfe-commits@lists.

Re: [PATCH] D11361: [OpenMP] Target directive host codegen

2015-09-10 Thread John McCall via cfe-commits
rjmccall added a comment. Sorry for putting off the final review on this; I was heads-down trying to get the alignment patch done. It's looking good; obviously you'll need to update it to work with Addresses properly, but hopefully that won't be too much of a problem. When you do, maybe you s

Re: [PATCH] D11361: [OpenMP] Target directive host codegen

2015-09-04 Thread Jonas Hahnfeld via cfe-commits
Hahnfeld added a comment. Needs two small changes to work with current trunk Comment at: lib/CodeGen/CGStmtOpenMP.cpp:2135-2136 @@ +2134,4 @@ + const Expr *IfCond = nullptr; + if (auto C = S.getSingleClause(OMPC_if)) { +IfCond = cast(C)->getCondition(); + } --

Re: [PATCH] D11361: [OpenMP] Target directive host codegen

2015-09-01 Thread Alexey Bataev via cfe-commits
ABataev added a comment. Seems good to me, but it would be good if John McCall could look at the patch. http://reviews.llvm.org/D11361 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D11361: [OpenMP] Target directive host codegen

2015-08-31 Thread Samuel Antao via cfe-commits
sfantao added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:2991-3005 @@ +2990,17 @@ + +/// \brief Values for bit flags used to specify the mapping type for +/// offloading. +enum OpenMPOffloadMappingFlags { + /// \brief Allocate memory on the device and move data

Re: [PATCH] D11361: [OpenMP] Target directive host codegen

2015-08-31 Thread Samuel Antao via cfe-commits
sfantao updated this revision to Diff 33640. sfantao added a comment. Address last review comments. http://reviews.llvm.org/D11361 Files: lib/CodeGen/CGOpenMPRuntime.cpp lib/CodeGen/CGOpenMPRuntime.h lib/CodeGen/CGStmtOpenMP.cpp test/OpenMP/target_codegen.cpp Index: test/OpenMP/target_

Re: [PATCH] D11361: [OpenMP] Target directive host codegen

2015-08-28 Thread Alexey Bataev via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:2991-3005 @@ +2990,17 @@ + +/// \brief Values for bit flags used to specify the mapping type for +/// offloading. +enum OpenMPOffloadMappingFlags { + /// \brief Allocate memory on the device and move data

Re: [PATCH] D11361: [OpenMP] Target directive host codegen

2015-08-25 Thread Samuel Antao via cfe-commits
sfantao added a comment. Thanks for the review! In http://reviews.llvm.org/D11361#232045, @ABataev wrote: > Samuel, Yes, I thought about different files and different classes. Runtime > for offloading codegen is not a part of libomp and it would be good to have > separate runtime handler class

Re: [PATCH] D11361: [OpenMP] Target directive host codegen

2015-08-25 Thread Samuel Antao via cfe-commits
sfantao updated this revision to Diff 33111. sfantao added a comment. Move map type and device id enums from CGOpenMPRuntime.h to CGOpenMPRuntime.cpp. http://reviews.llvm.org/D11361 Files: lib/CodeGen/CGOpenMPRuntime.cpp lib/CodeGen/CGOpenMPRuntime.h lib/CodeGen/CGStmtOpenMP.cpp test/Op

Re: [PATCH] D11361: [OpenMP] Target directive host codegen

2015-08-25 Thread Alexey Bataev via cfe-commits
ABataev added a comment. Samuel, Yes, I thought about different files and different classes. Runtime for offloading codegen is not a part of libomp and it would be good to have separate runtime handler class for target codegen also. We need to think about it in future. Commen

Re: [PATCH] D11361: [OpenMP] Target directive host codegen

2015-08-22 Thread Samuel Antao via cfe-commits
sfantao added a comment. Two more inlined comments that I forgot to integrate in my previous response. Thanks! Samuel Comment at: lib/CodeGen/CGOpenMPRuntime.h:190-204 @@ -180,2 +189,17 @@ + /// \brief Values for bit flags used to specify the mapping type for + /// offloading

Re: [PATCH] D11361: [OpenMP] Target directive host codegen

2015-08-21 Thread Samuel Antao via cfe-commits
sfantao added a comment. In http://reviews.llvm.org/D11361#229744, @ABataev wrote: > Another one thing I forget to mention. Current implementation of > CGOpenMPRuntime is libomp-specific. You're trying to add functionality that > is libtarget-specific. Maybe it is a good idea to separate suppor

Re: [PATCH] D11361: [OpenMP] Target directive host codegen

2015-08-21 Thread Samuel Antao via cfe-commits
sfantao updated this revision to Diff 32843. sfantao added a comment. Address reviewer concerns. http://reviews.llvm.org/D11361 Files: lib/CodeGen/CGOpenMPRuntime.cpp lib/CodeGen/CGOpenMPRuntime.h lib/CodeGen/CGStmtOpenMP.cpp test/OpenMP/target_codegen.cpp Index: test/OpenMP/target_cod

Re: [PATCH] D11361: [OpenMP] Target directive host codegen

2015-08-21 Thread Alexey Bataev via cfe-commits
ABataev added a comment. Another one thing I forget to mention. Current implementation of CGOpenMPRuntime is libomp-specific. You're trying to add functionality that is libtarget-specific. Maybe it is a good idea to separate support for libomp and libtarget runtime libraries? http://reviews.l

Re: [PATCH] D11361: [OpenMP] Target directive host codegen

2015-08-21 Thread Alexey Bataev via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:2887 @@ +2886,3 @@ +llvm::Value * +CGOpenMPRuntime::emitTargetOutlinedFunction(CodeGenFunction &CGF, +const OMPExecutableDirective &D, I don't th

Re: [PATCH] D11361: [OpenMP] Target directive host codegen

2015-08-20 Thread Samuel Antao via cfe-commits
sfantao added a comment. Thanks for review. The new diff now uses a proxy function. See other comments inlined. Thanks again! Samuel Comment at: lib/CodeGen/CGExpr.cpp:1969-1970 @@ -1945,4 +1968,4 @@ else - return EmitCapturedFieldLValue(*this, CapturedStmtIn

Re: [PATCH] D11361: [OpenMP] Target directive host codegen

2015-08-20 Thread Samuel Antao via cfe-commits
sfantao updated this revision to Diff 32796. sfantao added a comment. Implement proxy function for target directive. Move the creation of the target region parameters from `CGOpenMPRuntime::emitTargetCall` to CodeGenFunction::EmitTargetDirective because we need to access the VLA Maps of the tar

Re: [PATCH] D11361: [OpenMP] Target directive host codegen

2015-08-19 Thread Alexey Bataev via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:1969-1970 @@ -1945,4 +1968,4 @@ else - return EmitCapturedFieldLValue(*this, CapturedStmtInfo->lookup(VD), - CapturedStmtInfo->getContextValue()); +

Re: [PATCH] D11361: [OpenMP] Target directive host codegen

2015-08-17 Thread Samuel Antao via cfe-commits
sfantao added a comment. Alexey, Thanks for the review! Find my comments inlined. Thanks again! Samuel Comment at: lib/CodeGen/CGExpr.cpp:1969 @@ -1945,3 +1968,3 @@ else - return EmitCapturedFieldLValue(*this, CapturedStmtInfo->lookup(VD), -

Re: [PATCH] D11361: [OpenMP] Target directive host codegen

2015-08-17 Thread Samuel Antao via cfe-commits
sfantao updated this revision to Diff 32322. sfantao added a comment. Adress reviewers concerns. Also fix issue with target regions with no arguments and in the VLA size computation I found in the meantime. http://reviews.llvm.org/D11361 Files: include/clang/AST/Decl.h include/clang/AST/S

Re: [PATCH] D11361: [OpenMP] Target directive host codegen

2015-08-16 Thread Alexey Bataev via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:1969 @@ -1945,3 +1968,3 @@ else - return EmitCapturedFieldLValue(*this, CapturedStmtInfo->lookup(VD), - CapturedStmtInfo->getContextValue()); + retu

Re: [PATCH] D11361: [OpenMP] Target directive host codegen

2015-08-14 Thread Samuel Antao via cfe-commits
sfantao added a comment. Alexey, John, Thanks for the review! I've tried to address your concerns in the last diff. Please, check the inlined comments to find answers for the remarks of the previous diff. Thanks again! Samuel Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:863-8

Re: [PATCH] D11361: [OpenMP] Target directive host codegen

2015-08-14 Thread Samuel Antao via cfe-commits
sfantao updated this revision to Diff 32211. sfantao added a comment. This patch tries to avoid as much as possible changing the common infrastructure, by adapting the CapturedDecl creation in SEMA and by adding support to a second type of capture - ImplicitParamDecl (on top of the existent Fie