[NVPTX] Infer __nvvm_reflect as nounwind, readnone
authorDavid Majnemer <david.majnemer@gmail.com>
Thu, 31 Mar 2016 21:29:57 +0000 (21:29 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Thu, 31 Mar 2016 21:29:57 +0000 (21:29 +0000)
commitae272d718e882b18258a587ce111a4150d761b5e
tree79ee814eebc9b9e6cc4f4b9040b02bd838774757
parent13f6da1d2c20ebb0c4f6600b4ea23d428ef20cc5
[NVPTX] Infer __nvvm_reflect as nounwind, readnone

This patch simply mirrors the attributes we give to @llvm.nvvm.reflect
to the __nvvm_reflect libdevice call.  This shaves about 30% of the code
in libdevice away because of CSE opportunities.  It's also helps us
figure out that libdevice implementations of transcendental functions
don't have side-effects.

llvm-svn: 265060
llvm/include/llvm/Analysis/TargetLibraryInfo.def
llvm/lib/Analysis/TargetLibraryInfo.cpp
llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp
llvm/test/Transforms/InferFunctionAttrs/annotate.ll