summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCUDA/Inputs
diff options
context:
space:
mode:
authorArtem Belevich <tra@google.com>2015-10-27 17:56:59 +0000
committerArtem Belevich <tra@google.com>2015-10-27 17:56:59 +0000
commit5d40ae3a46a43eb0dd16dec801af5517d2ea9e96 (patch)
tree7d094e176b3753cd823a271856235bc13e30152e /clang/test/CodeGenCUDA/Inputs
parent6eb683891fcbf667d59163f1c782b0ea5b1b97fc (diff)
downloadbcm5719-llvm-5d40ae3a46a43eb0dd16dec801af5517d2ea9e96.tar.gz
bcm5719-llvm-5d40ae3a46a43eb0dd16dec801af5517d2ea9e96.zip
Allow linking multiple bitcode files.
Linking options for particular file depend on the option that specifies the file. Currently there are two: * -mlink-bitcode-file links in complete content of the specified file. * -mlink-cuda-bitcode links in only the symbols needed by current TU. Linked symbols are internalized. This bitcode linking mode is used to link device-specific bitcode provided by CUDA. Files are linked in order they are specified on command line. -mlink-cuda-bitcode replaces -fcuda-uses-libdevice flag. Differential Revision: http://reviews.llvm.org/D13913 llvm-svn: 251427
Diffstat (limited to 'clang/test/CodeGenCUDA/Inputs')
-rw-r--r--clang/test/CodeGenCUDA/Inputs/device-code-2.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/CodeGenCUDA/Inputs/device-code-2.ll b/clang/test/CodeGenCUDA/Inputs/device-code-2.ll
new file mode 100644
index 00000000000..8fde3b13ec7
--- /dev/null
+++ b/clang/test/CodeGenCUDA/Inputs/device-code-2.ll
@@ -0,0 +1,16 @@
+; Simple bit of IR to mimic CUDA's libdevice.
+
+target triple = "nvptx-unknown-cuda"
+
+define double @__nv_sin(double %a) {
+ ret double 1.0
+}
+
+define double @__nv_exp(double %a) {
+ ret double 3.0
+}
+
+define double @__unused(double %a) {
+ ret double 2.0
+}
+
OpenPOWER on IntegriCloud