Expose "noduplicate" attribute as a property for intrinsics.
authorEli Bendersky <eliben@google.com>
Tue, 18 Mar 2014 23:51:07 +0000 (23:51 +0000)
committerEli Bendersky <eliben@google.com>
Tue, 18 Mar 2014 23:51:07 +0000 (23:51 +0000)
commit21354ec60d0dde4f1995d816701b895c57f806bd
treec00e675912eb5ddca01b813594beb3b9d03dd719
parentcae25dcbf7347d1a04f8746aedd6d6600b528a40
Expose "noduplicate" attribute as a property for intrinsics.

The "noduplicate" function attribute exists to prevent certain optimizations
from duplicating calls to the function. This is important on platforms where
certain function call duplications are unsafe (for example execution barriers
for CUDA and OpenCL).

This patch makes it possible to specify intrinsics as "noduplicate" and
translates that to the appropriate function attribute.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204200 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/Intrinsics.td
include/llvm/IR/IntrinsicsNVVM.td
test/CodeGen/NVPTX/noduplicate-syncthreads.ll [new file with mode: 0644]
test/Feature/intrinsic-noduplicate.ll [new file with mode: 0644]
utils/TableGen/CodeGenIntrinsics.h
utils/TableGen/CodeGenTarget.cpp
utils/TableGen/IntrinsicEmitter.cpp