diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2018-11-07 19:11:14 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2018-11-07 19:11:14 +0000 |
commit | 2a6f3f5fa20b231ba75294430af2bd3c9cb5db28 (patch) | |
tree | 4ddc8755e5b16f4026cc278eff43b00bc52950b7 /clang/lib/CodeGen/CGOpenMPRuntime.h | |
parent | 37b102d2fa1147b91f6638d2aa8c4ea2db521f89 (diff) | |
download | bcm5719-llvm-2a6f3f5fa20b231ba75294430af2bd3c9cb5db28.tar.gz bcm5719-llvm-2a6f3f5fa20b231ba75294430af2bd3c9cb5db28.zip |
[OPENMP]Fix handling of the globals during compilation for the device.
Fixed lookup for the target regions in unused virtual functions + fixed
processing of the global variables not marked as declare target but
emitted during debug info emission.
llvm-svn: 346343
Diffstat (limited to 'clang/lib/CodeGen/CGOpenMPRuntime.h')
-rw-r--r-- | clang/lib/CodeGen/CGOpenMPRuntime.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.h b/clang/lib/CodeGen/CGOpenMPRuntime.h index 7236b9e2519..8b8f57c5be4 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntime.h +++ b/clang/lib/CodeGen/CGOpenMPRuntime.h @@ -19,8 +19,8 @@ #include "clang/Basic/OpenMPKinds.h" #include "clang/Basic/SourceLocation.h" #include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/StringMap.h" +#include "llvm/ADT/StringSet.h" #include "llvm/IR/Function.h" #include "llvm/IR/ValueHandle.h" @@ -602,7 +602,11 @@ private: OffloadEntriesInfoManagerTy OffloadEntriesInfoManager; bool ShouldMarkAsGlobal = true; - llvm::SmallDenseSet<const Decl *> AlreadyEmittedTargetFunctions; + /// List of the emitted functions. + llvm::StringSet<> AlreadyEmittedTargetFunctions; + /// List of the global variables with their addresses that should not be + /// emitted for the target. + llvm::StringMap<llvm::WeakTrackingVH> EmittedNonTargetVariables; /// List of variables that can become declare target implicitly and, thus, /// must be emitted. @@ -679,10 +683,10 @@ private: const llvm::Twine &Name); /// Set of threadprivate variables with the generated initializer. - llvm::SmallPtrSet<const VarDecl *, 4> ThreadPrivateWithDefinition; + llvm::StringSet<> ThreadPrivateWithDefinition; /// Set of declare target variables with the generated initializer. - llvm::SmallPtrSet<const VarDecl *, 4> DeclareTargetWithDefinition; + llvm::StringSet<> DeclareTargetWithDefinition; /// Emits initialization code for the threadprivate variables. /// \param VDAddr Address of the global variable \a VD. |