diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2016-12-20 17:19:44 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2016-12-20 17:19:44 +0000 |
commit | 6f9ef14b9dd02a59db00190f1692822740ea34bf (patch) | |
tree | e0d781510927b98679c27fc24d68c4d8d39a95c8 /llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h | |
parent | 688114d888db0616f02caedbf0e94bad6a473512 (diff) | |
download | bcm5719-llvm-6f9ef14b9dd02a59db00190f1692822740ea34bf.tar.gz bcm5719-llvm-6f9ef14b9dd02a59db00190f1692822740ea34bf.zip |
AMDGPU/SI: Add a MachineMemOperand when lowering llvm.amdgcn.buffer.load.*
Reviewers: arsenm, nhaehnle, mareko
Subscribers: kzhuravl, wdng, yaxunl, llvm-commits, tony-tye
Differential Revision: https://reviews.llvm.org/D27834
llvm-svn: 290184
Diffstat (limited to 'llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h')
-rw-r--r-- | llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h index 0b92198f20a..f4c210f1f2c 100644 --- a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h +++ b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h @@ -47,6 +47,29 @@ public: } }; +class AMDGPUBufferPseudoSourceValue : public PseudoSourceValue { +public: + explicit AMDGPUBufferPseudoSourceValue() : + PseudoSourceValue(PseudoSourceValue::TargetCustom) { } + + bool isConstant(const MachineFrameInfo *) const override { + // This should probably be true for most images, but we will start by being + // conservative. + return false; + } + + bool isAliased(const MachineFrameInfo *) const override { + // FIXME: If we ever change image intrinsics to accept fat pointers, then + // this could be true for some cases. + return false; + } + + bool mayAlias(const MachineFrameInfo*) const override { + // FIXME: If we ever change image intrinsics to accept fat pointers, then + // this could be true for some cases. + return false; + } +}; /// This class keeps track of the SPI_SP_INPUT_ADDR config register, which /// tells the hardware which interpolation parameters to load. @@ -98,6 +121,7 @@ class SIMachineFunctionInfo final : public AMDGPUMachineFunction { // Stack object indices for work item IDs. std::array<int, 3> DebuggerWorkItemIDStackObjectIndices; + AMDGPUBufferPseudoSourceValue BufferPSV; std::unique_ptr<AMDGPUImagePseudoSourceValue> ImagePSV; public: @@ -462,6 +486,10 @@ public: llvm_unreachable("unexpected dimension"); } + const AMDGPUBufferPseudoSourceValue *getBufferPSV() const { + return &BufferPSV; + } + AMDGPUImagePseudoSourceValue *getImagePSV() { return ImagePSV.get(); } |