Add pthread_self function prototype and make it speculatable.
authorXin Tong <trent.xin.tong@gmail.com>
Sat, 20 May 2017 22:40:25 +0000 (22:40 +0000)
committerXin Tong <trent.xin.tong@gmail.com>
Sat, 20 May 2017 22:40:25 +0000 (22:40 +0000)
commit75af3af95780e1c379409bf56c516a272c4fa961
treedf81d93ee10bd76a5be14744ff2ef967f0ddfeb8
parent36af8f4d42a0d4c5191450f5b729749b56bcc0e7
Add pthread_self function prototype and make it speculatable.

Summary: This allows pthread_self to be pulled out of a loop by LICM.

Reviewers: hfinkel, arsenm, davide

Reviewed By: davide

Subscribers: davide, wdng, llvm-commits

Differential Revision: https://reviews.llvm.org/D32782

llvm-svn: 303495
llvm/include/llvm/Analysis/TargetLibraryInfo.def
llvm/lib/Analysis/TargetLibraryInfo.cpp
llvm/lib/Transforms/Utils/BuildLibCalls.cpp
llvm/test/Transforms/LICM/pthread.ll [new file with mode: 0644]
llvm/unittests/Analysis/TargetLibraryInfoTest.cpp