diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2016-03-28 10:12:03 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2016-03-28 10:12:03 +0000 |
commit | f662b5943cba56f4ebc249046bc6b4f69a42b0ca (patch) | |
tree | cc55c80852a6d0750a9d5ec4061ac6b3c6b3bab8 /clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.h | |
parent | b8c425c4f7655978768871102e57db0af7eb467e (diff) | |
download | bcm5719-llvm-f662b5943cba56f4ebc249046bc6b4f69a42b0ca.tar.gz bcm5719-llvm-f662b5943cba56f4ebc249046bc6b4f69a42b0ca.zip |
Revert "[OPENMP] Allow runtime insert its own code inside OpenMP regions."
This reverts commit 3ee791165100607178073f14531a0dc90c622b36.
llvm-svn: 264570
Diffstat (limited to 'clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.h')
-rw-r--r-- | clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.h | 57 |
1 files changed, 27 insertions, 30 deletions
diff --git a/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.h b/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.h index 6ef3d3c08bd..b52bae04e0e 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.h +++ b/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.h @@ -24,34 +24,6 @@ namespace clang { namespace CodeGen { class CGOpenMPRuntimeNVPTX : public CGOpenMPRuntime { -public: - class EntryFunctionState { - public: - llvm::BasicBlock *ExitBB; - - EntryFunctionState() : ExitBB(nullptr){}; - }; - - class WorkerFunctionState { - public: - llvm::Function *WorkerFn; - const CGFunctionInfo *CGFI; - - WorkerFunctionState(CodeGenModule &CGM); - - private: - void createWorkerFunction(CodeGenModule &CGM); - }; - - /// \brief Helper for target entry function. Guide the master and worker - /// threads to their respective locations. - void emitEntryHeader(CodeGenFunction &CGF, EntryFunctionState &EST, - WorkerFunctionState &WST); - - /// \brief Signal termination of OMP execution. - void emitEntryFooter(CodeGenFunction &CGF, EntryFunctionState &EST); - -private: // // NVPTX calls. // @@ -94,6 +66,24 @@ private: // Outlined function for the workers to execute. llvm::GlobalVariable *WorkID; + class EntryFunctionState { + public: + llvm::BasicBlock *ExitBB; + + EntryFunctionState() : ExitBB(nullptr){}; + }; + + class WorkerFunctionState { + public: + llvm::Function *WorkerFn; + const CGFunctionInfo *CGFI; + + WorkerFunctionState(CodeGenModule &CGM); + + private: + void createWorkerFunction(CodeGenModule &CGM); + }; + /// \brief Initialize master-worker control state. void initializeEnvironment(); @@ -103,6 +93,14 @@ private: /// \brief Helper for worker function. Emit body of worker loop. void emitWorkerLoop(CodeGenFunction &CGF, WorkerFunctionState &WST); + /// \brief Helper for target entry function. Guide the master and worker + /// threads to their respective locations. + void emitEntryHeader(CodeGenFunction &CGF, EntryFunctionState &EST, + WorkerFunctionState &WST); + + /// \brief Signal termination of OMP execution. + void emitEntryFooter(CodeGenFunction &CGF, EntryFunctionState &EST); + /// \brief Returns specified OpenMP runtime function for the current OpenMP /// implementation. Specialized for the NVPTX device. /// \param Function OpenMP runtime function. @@ -131,8 +129,7 @@ private: StringRef ParentName, llvm::Function *&OutlinedFn, llvm::Constant *&OutlinedFnID, - bool IsOffloadEntry, - const RegionCodeGenTy &CodeGen) override; + bool IsOffloadEntry) override; public: explicit CGOpenMPRuntimeNVPTX(CodeGenModule &CGM); |