[AArch64] [ARM] Make a target-independent llvm.thread.pointer intrinsic.
authorMarcin Koscielnicki <koriakin@0x04.net>
Tue, 19 Apr 2016 20:51:05 +0000 (20:51 +0000)
committerMarcin Koscielnicki <koriakin@0x04.net>
Tue, 19 Apr 2016 20:51:05 +0000 (20:51 +0000)
commit3fdc257d6a5d6e7a1851d9c78dc49d516ee488be
treec233d3f54b6a3d79301636604e1ff7d4ac2c8e9c
parent4005070e1bad88113f45cb843635206050fe62e2
[AArch64] [ARM] Make a target-independent llvm.thread.pointer intrinsic.

Both AArch64 and ARM support llvm.<arch>.thread.pointer intrinsics that
just return the thread pointer.  I have a pending patch that does the same
for SystemZ (D19054), and there are many more targets that could benefit
from one.

This patch merges the ARM and AArch64 intrinsics into a single target
independent one that will also be used by subsequent targets.

Differential Revision: http://reviews.llvm.org/D19098

llvm-svn: 266818
12 files changed:
llvm/docs/LangRef.rst
llvm/include/llvm/IR/Intrinsics.td
llvm/include/llvm/IR/IntrinsicsAArch64.td
llvm/include/llvm/IR/IntrinsicsARM.td
llvm/lib/IR/AutoUpgrade.cpp
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/test/Assembler/autoupgrade-thread-pointer.ll [new file with mode: 0644]
llvm/test/CodeGen/AArch64/arm64-builtins-linux.ll
llvm/test/CodeGen/ARM/thread_pointer.ll
llvm/test/Transforms/SafeStack/AArch64/abi.ll
llvm/test/Transforms/SafeStack/AArch64/abi_ssp.ll