Re: r310379 - Revert "[OPENMP][DEBUG] Set proper address space info if required by target."

2017-08-14 Thread David Blaikie via cfe-commits
It's helpful to mention why a patch is reverted in the commit message that
reverts. Thought for next time! :)

On Tue, Aug 8, 2017 at 9:46 AM Alexey Bataev via cfe-commits <
cfe-commits@lists.llvm.org> wrote:

> Author: abataev
> Date: Tue Aug  8 09:45:36 2017
> New Revision: 310379
>
> URL: http://llvm.org/viewvc/llvm-project?rev=310379=rev
> Log:
> Revert "[OPENMP][DEBUG] Set proper address space info if required by
> target."
>
> This reverts commit r310377.
>
> Removed:
> cfe/trunk/test/OpenMP/target_parallel_debug_codegen.cpp
> Modified:
> cfe/trunk/include/clang/Basic/Attr.td
> cfe/trunk/include/clang/Sema/Sema.h
> cfe/trunk/lib/CodeGen/CGOpenMPRuntime.h
> cfe/trunk/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
> cfe/trunk/lib/CodeGen/CGOpenMPRuntimeNVPTX.h
> cfe/trunk/lib/CodeGen/CGStmtOpenMP.cpp
> cfe/trunk/lib/Sema/SemaExpr.cpp
> cfe/trunk/lib/Sema/SemaOpenMP.cpp
> cfe/trunk/test/OpenMP/nvptx_target_firstprivate_codegen.cpp
>
> Modified: cfe/trunk/include/clang/Basic/Attr.td
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Attr.td?rev=310379=310378=310379=diff
>
> ==
> --- cfe/trunk/include/clang/Basic/Attr.td (original)
> +++ cfe/trunk/include/clang/Basic/Attr.td Tue Aug  8 09:45:36 2017
> @@ -2685,14 +2685,6 @@ def OMPCaptureNoInit : InheritableAttr {
>let Documentation = [Undocumented];
>  }
>
> -def OMPCaptureKind : Attr {
> -  // This attribute has no spellings as it is only ever created
> implicitly.
> -  let Spellings = [];
> -  let SemaHandler = 0;
> -  let Args = [UnsignedArgument<"CaptureKind">];
> -  let Documentation = [Undocumented];
> -}
> -
>  def OMPDeclareSimdDecl : Attr {
>let Spellings = [Pragma<"omp", "declare simd">];
>let Subjects = SubjectList<[Function]>;
>
> Modified: cfe/trunk/include/clang/Sema/Sema.h
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Sema.h?rev=310379=310378=310379=diff
>
> ==
> --- cfe/trunk/include/clang/Sema/Sema.h (original)
> +++ cfe/trunk/include/clang/Sema/Sema.h Tue Aug  8 09:45:36 2017
> @@ -8527,11 +8527,6 @@ public:
>/// is performed.
>bool isOpenMPPrivateDecl(ValueDecl *D, unsigned Level);
>
> -  /// Sets OpenMP capture kind (OMPC_private, OMPC_firstprivate, OMPC_map
> etc.)
> -  /// for \p FD based on DSA for the provided corresponding captured
> declaration
> -  /// \p D.
> -  void setOpenMPCaptureKind(FieldDecl *FD, ValueDecl *D, unsigned Level);
> -
>/// \brief Check if the specified variable is captured  by 'target'
> directive.
>/// \param Level Relative level of nested OpenMP construct for that the
> check
>/// is performed.
>
> Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntime.h
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGOpenMPRuntime.h?rev=310379=310378=310379=diff
>
> ==
> --- cfe/trunk/lib/CodeGen/CGOpenMPRuntime.h (original)
> +++ cfe/trunk/lib/CodeGen/CGOpenMPRuntime.h Tue Aug  8 09:45:36 2017
> @@ -1325,32 +1325,6 @@ public:
>virtual void emitDoacrossOrdered(CodeGenFunction ,
> const OMPDependClause *C);
>
> -  /// Translates the native parameter of outlined function if this is
> required
> -  /// for target.
> -  /// \param FD Field decl from captured record for the paramater.
> -  /// \param NativeParam Parameter itself.
> -  virtual const VarDecl *translateParameter(const FieldDecl *FD,
> -const VarDecl *NativeParam)
> const {
> -return NativeParam;
> -  }
> -
> -  typedef llvm::function_ref Address)>
> -  MappingFnType;
> -  /// Maps the native argument to the address of the corresponding
> -  /// target-specific argument.
> -  /// \param FD Field decl from captured record for the paramater.
> -  /// \param NativeParam Parameter itself.
> -  /// \param TargetParam Corresponding target-specific parameter.
> -  /// \param MapFn Function that maps the native parameter to the address
> of the
> -  /// target-specific.
> -  virtual void mapParameterAddress(CodeGenFunction , const FieldDecl
> *FD,
> -   const VarDecl *NativeParam,
> -   const VarDecl *TargetParam,
> -   const MappingFnType) const {
> -assert(NativeParam == TargetParam &&
> -   "native and target args must be the same");
> -  }
> -
>/// Emits call of the outlined function with the provided arguments,
>/// translating these arguments to correct target-specific arguments.
>virtual void
>
> Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
> URL:
> 

r310379 - Revert "[OPENMP][DEBUG] Set proper address space info if required by target."

2017-08-08 Thread Alexey Bataev via cfe-commits
Author: abataev
Date: Tue Aug  8 09:45:36 2017
New Revision: 310379

URL: http://llvm.org/viewvc/llvm-project?rev=310379=rev
Log:
Revert "[OPENMP][DEBUG] Set proper address space info if required by target."

This reverts commit r310377.

Removed:
cfe/trunk/test/OpenMP/target_parallel_debug_codegen.cpp
Modified:
cfe/trunk/include/clang/Basic/Attr.td
cfe/trunk/include/clang/Sema/Sema.h
cfe/trunk/lib/CodeGen/CGOpenMPRuntime.h
cfe/trunk/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
cfe/trunk/lib/CodeGen/CGOpenMPRuntimeNVPTX.h
cfe/trunk/lib/CodeGen/CGStmtOpenMP.cpp
cfe/trunk/lib/Sema/SemaExpr.cpp
cfe/trunk/lib/Sema/SemaOpenMP.cpp
cfe/trunk/test/OpenMP/nvptx_target_firstprivate_codegen.cpp

Modified: cfe/trunk/include/clang/Basic/Attr.td
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Attr.td?rev=310379=310378=310379=diff
==
--- cfe/trunk/include/clang/Basic/Attr.td (original)
+++ cfe/trunk/include/clang/Basic/Attr.td Tue Aug  8 09:45:36 2017
@@ -2685,14 +2685,6 @@ def OMPCaptureNoInit : InheritableAttr {
   let Documentation = [Undocumented];
 }
 
-def OMPCaptureKind : Attr {
-  // This attribute has no spellings as it is only ever created implicitly.
-  let Spellings = [];
-  let SemaHandler = 0;
-  let Args = [UnsignedArgument<"CaptureKind">];
-  let Documentation = [Undocumented];
-}
-
 def OMPDeclareSimdDecl : Attr {
   let Spellings = [Pragma<"omp", "declare simd">];
   let Subjects = SubjectList<[Function]>;

Modified: cfe/trunk/include/clang/Sema/Sema.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Sema.h?rev=310379=310378=310379=diff
==
--- cfe/trunk/include/clang/Sema/Sema.h (original)
+++ cfe/trunk/include/clang/Sema/Sema.h Tue Aug  8 09:45:36 2017
@@ -8527,11 +8527,6 @@ public:
   /// is performed.
   bool isOpenMPPrivateDecl(ValueDecl *D, unsigned Level);
 
-  /// Sets OpenMP capture kind (OMPC_private, OMPC_firstprivate, OMPC_map etc.)
-  /// for \p FD based on DSA for the provided corresponding captured 
declaration
-  /// \p D.
-  void setOpenMPCaptureKind(FieldDecl *FD, ValueDecl *D, unsigned Level);
-
   /// \brief Check if the specified variable is captured  by 'target' 
directive.
   /// \param Level Relative level of nested OpenMP construct for that the check
   /// is performed.

Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntime.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGOpenMPRuntime.h?rev=310379=310378=310379=diff
==
--- cfe/trunk/lib/CodeGen/CGOpenMPRuntime.h (original)
+++ cfe/trunk/lib/CodeGen/CGOpenMPRuntime.h Tue Aug  8 09:45:36 2017
@@ -1325,32 +1325,6 @@ public:
   virtual void emitDoacrossOrdered(CodeGenFunction ,
const OMPDependClause *C);
 
-  /// Translates the native parameter of outlined function if this is required
-  /// for target.
-  /// \param FD Field decl from captured record for the paramater.
-  /// \param NativeParam Parameter itself.
-  virtual const VarDecl *translateParameter(const FieldDecl *FD,
-const VarDecl *NativeParam) const {
-return NativeParam;
-  }
-
-  typedef llvm::function_ref
-  MappingFnType;
-  /// Maps the native argument to the address of the corresponding
-  /// target-specific argument.
-  /// \param FD Field decl from captured record for the paramater.
-  /// \param NativeParam Parameter itself.
-  /// \param TargetParam Corresponding target-specific parameter.
-  /// \param MapFn Function that maps the native parameter to the address of 
the
-  /// target-specific.
-  virtual void mapParameterAddress(CodeGenFunction , const FieldDecl *FD,
-   const VarDecl *NativeParam,
-   const VarDecl *TargetParam,
-   const MappingFnType) const {
-assert(NativeParam == TargetParam &&
-   "native and target args must be the same");
-  }
-
   /// Emits call of the outlined function with the provided arguments,
   /// translating these arguments to correct target-specific arguments.
   virtual void

Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp?rev=310379=310378=310379=diff
==
--- cfe/trunk/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp Tue Aug  8 09:45:36 2017
@@ -2238,81 +2238,3 @@ void CGOpenMPRuntimeNVPTX::emitReduction
   CGF.EmitBranch(DefaultBB);
   CGF.EmitBlock(DefaultBB, /*IsFinished=*/true);
 }
-
-const VarDecl *