[NVPTX] Add preliminary intrinsics and codegen support for textures/surfaces
authorJustin Holewinski <jholewinski@nvidia.com>
Wed, 9 Apr 2014 15:39:15 +0000 (15:39 +0000)
committerJustin Holewinski <jholewinski@nvidia.com>
Wed, 9 Apr 2014 15:39:15 +0000 (15:39 +0000)
commit77f268945e4d4b777102d4a2089cb86137042883
treefbd8740fff0620884b9c0c44a8f0e37252f4f7f8
parentac4c131de6a8d797dcb91398b6b315635cf22c40
[NVPTX] Add preliminary intrinsics and codegen support for textures/surfaces

This commit adds intrinsics and codegen support for the surface read/write and texture read instructions that take an explicit sampler parameter. Codegen operates on image handles at the PTX level, but falls back to direct replacement of handles with kernel arguments if image handles are not enabled. Note that image handles are explicitly disabled for all target architectures in this change (to be enabled later).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205907 91177308-0d34-0410-b5e6-96231b3b80d8
18 files changed:
include/llvm/IR/IntrinsicsNVVM.td
lib/Target/NVPTX/CMakeLists.txt
lib/Target/NVPTX/NVPTX.h
lib/Target/NVPTX/NVPTXAsmPrinter.cpp
lib/Target/NVPTX/NVPTXAsmPrinter.h
lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp
lib/Target/NVPTX/NVPTXISelDAGToDAG.h
lib/Target/NVPTX/NVPTXISelLowering.cpp
lib/Target/NVPTX/NVPTXISelLowering.h
lib/Target/NVPTX/NVPTXImageOptimizer.cpp [new file with mode: 0644]
lib/Target/NVPTX/NVPTXIntrinsics.td
lib/Target/NVPTX/NVPTXMachineFunctionInfo.h [new file with mode: 0644]
lib/Target/NVPTX/NVPTXReplaceImageHandles.cpp [new file with mode: 0644]
lib/Target/NVPTX/NVPTXSubtarget.h
lib/Target/NVPTX/NVPTXTargetMachine.cpp
test/CodeGen/NVPTX/surf-read.ll [new file with mode: 0644]
test/CodeGen/NVPTX/surf-write.ll [new file with mode: 0644]
test/CodeGen/NVPTX/tex-read.ll [new file with mode: 0644]