summaryrefslogtreecommitdiffstats
path: root/lib/Driver/ToolChains/Cuda.h
diff options
context:
space:
mode:
authorGheorghe-Teodor Bercea <gheorghe-teod.bercea@ibm.com>2017-08-08 14:33:05 +0000
committerGheorghe-Teodor Bercea <gheorghe-teod.bercea@ibm.com>2017-08-08 14:33:05 +0000
commitee21c4d6a6880a918e87c02d80907787f0196168 (patch)
treef6450e38708fdfefe3d086d4456a317f5d4eaa9b /lib/Driver/ToolChains/Cuda.h
parent7dd032a3598346ec709a8c5fa9d6de6655afa1ea (diff)
[OpenMP] OpenMP device offloading code generation produces a cubin file which is then integrated in the host binary using the host linker.
Diff: D29654 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310362 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChains/Cuda.h')
-rw-r--r--lib/Driver/ToolChains/Cuda.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/Driver/ToolChains/Cuda.h b/lib/Driver/ToolChains/Cuda.h
index e66fc23d82..1e30aa7270 100644
--- a/lib/Driver/ToolChains/Cuda.h
+++ b/lib/Driver/ToolChains/Cuda.h
@@ -112,6 +112,20 @@ class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
const char *LinkingOutput) const override;
};
+class LLVM_LIBRARY_VISIBILITY OpenMPLinker : public Tool {
+ public:
+ OpenMPLinker(const ToolChain &TC)
+ : Tool("NVPTX::OpenMPLinker", "fatbinary", TC, RF_Full, llvm::sys::WEM_UTF8,
+ "--options-file") {}
+
+ bool hasIntegratedCPP() const override { return false; }
+
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output, const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
+};
+
} // end namespace NVPTX
} // end namespace tools
@@ -120,7 +134,8 @@ namespace toolchains {
class LLVM_LIBRARY_VISIBILITY CudaToolChain : public ToolChain {
public:
CudaToolChain(const Driver &D, const llvm::Triple &Triple,
- const ToolChain &HostTC, const llvm::opt::ArgList &Args);
+ const ToolChain &HostTC, const llvm::opt::ArgList &Args,
+ const Action::OffloadKind OK);
virtual const llvm::Triple *getAuxTriple() const override {
return &HostTC.getTriple();
@@ -169,6 +184,9 @@ public:
protected:
Tool *buildAssembler() const override; // ptxas
Tool *buildLinker() const override; // fatbinary (ok, not really a linker)
+
+private:
+ const Action::OffloadKind OK;
};
} // end namespace toolchains