[NVPTX] Added a feature to use short pointers for const/local/shared AS.
authorArtem Belevich <tra@google.com>
Wed, 9 May 2018 23:46:19 +0000 (23:46 +0000)
committerArtem Belevich <tra@google.com>
Wed, 9 May 2018 23:46:19 +0000 (23:46 +0000)
commit2f348ea1c75646d98b9079fae527c6e600a2beb1
tree4ca42d9190e9bd34f6d1dcfd69353168ffe5066d
parentc779388c7bfbdd38b31923aea1ccb4cd35ca23b6
[NVPTX] Added a feature to use short pointers for const/local/shared AS.

Const/local/shared address spaces are all < 4GB and we can always use
32-bit pointers to access them. This has substantial performance impact
on kernels that uses shared memory for intermediary results.

The feature is disabled by default.

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

llvm-svn: 331941
llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp
llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.h
llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
llvm/lib/Target/NVPTX/NVPTXInstrInfo.td
llvm/lib/Target/NVPTX/NVPTXIntrinsics.td
llvm/lib/Target/NVPTX/NVPTXSubtarget.h
llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp
llvm/lib/Target/NVPTX/NVPTXTargetMachine.h
llvm/test/CodeGen/NVPTX/addrspacecast.ll
llvm/test/CodeGen/NVPTX/ld-addrspace.ll
llvm/test/CodeGen/NVPTX/st-addrspace.ll