diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2017-08-08 18:04:06 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2017-08-08 18:04:06 +0000 |
commit | 3b8d5586ec1356479bcf21636ee9f640ef0265c7 (patch) | |
tree | 9a3f0ed8509d3fdf8ad66416da64eba3e17f393d /clang/lib/CodeGen/CGOpenMPRuntime.h | |
parent | 41a550ccfa0bb564c0a45df2a4853c4bd73d309d (diff) | |
download | bcm5719-llvm-3b8d5586ec1356479bcf21636ee9f640ef0265c7.tar.gz bcm5719-llvm-3b8d5586ec1356479bcf21636ee9f640ef0265c7.zip |
[OPENMP][DEBUG] Set proper address space info if required by target.
Arguments, passed to the outlined function, must have correct address
space info for proper Debug info support. Patch sets global address
space for arguments that are mapped and passed by reference.
Also, cuda-gdb does not handle reference types correctly, so reference
arguments are represented as pointers.
llvm-svn: 310387
Diffstat (limited to 'clang/lib/CodeGen/CGOpenMPRuntime.h')
-rw-r--r-- | clang/lib/CodeGen/CGOpenMPRuntime.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.h b/clang/lib/CodeGen/CGOpenMPRuntime.h index 809d9fa0a92..d28f8508675 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntime.h +++ b/clang/lib/CodeGen/CGOpenMPRuntime.h @@ -1325,6 +1325,23 @@ public: virtual void emitDoacrossOrdered(CodeGenFunction &CGF, 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; + } + + /// Gets the address of the native argument basing on the address of the + /// target-specific parameter. + /// \param NativeParam Parameter itself. + /// \param TargetParam Corresponding target-specific parameter. + virtual Address getParameterAddress(CodeGenFunction &CGF, + const VarDecl *NativeParam, + const VarDecl *TargetParam) const; + /// Emits call of the outlined function with the provided arguments, /// translating these arguments to correct target-specific arguments. virtual void |