Artem Belevich 5d40ae3a46 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
2015-10-27 17:56:59 +00:00

17 lines
271 B
LLVM

; 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
}