OSDN Git Service

[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)
commit54136ef7b3de85c195a01d33179a2502d4c9696c
tree54a4497278dc583d2965340252a6d7076ac07ed3
parentc7e42230b0e88fb63dc8d1b91b77e9830510ed3e
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265060 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/TargetLibraryInfo.def
lib/Analysis/TargetLibraryInfo.cpp
lib/Transforms/IPO/InferFunctionAttrs.cpp
test/Transforms/InferFunctionAttrs/annotate.ll