summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2017-01-27 18:41:14 +0000
committerTom Stellard <thomas.stellard@amd.com>2017-01-27 18:41:14 +0000
commit08efb7ebf686a48a48b5d90a6ec264b58233829b (patch)
tree5bb98f09dad011f11dd1bf8b730ca6c27963b8c7 /llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
parentfe12450e8e1b5b1daaab729700f1269c4b1f2095 (diff)
downloadbcm5719-llvm-08efb7ebf686a48a48b5d90a6ec264b58233829b.tar.gz
bcm5719-llvm-08efb7ebf686a48a48b5d90a6ec264b58233829b.zip
AMDGPU/SI: Move some ISel helpers into utils so they can be shared with GISel
Reviewers: arsenm Reviewed By: arsenm Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, llvm-commits, tony-tye Differential Revision: https://reviews.llvm.org/D29068 llvm-svn: 293321
Diffstat (limited to 'llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h')
-rw-r--r--llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
index ea5fc366d20..10944d2fee6 100644
--- a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
+++ b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
@@ -24,6 +24,7 @@ namespace llvm {
class FeatureBitset;
class Function;
class GlobalValue;
+class MachineMemOperand;
class MCContext;
class MCInstrDesc;
class MCRegisterClass;
@@ -210,6 +211,17 @@ bool isInlinableLiteral32(int32_t Literal, bool HasInv2Pi);
LLVM_READNONE
bool isInlinableLiteral16(int16_t Literal, bool HasInv2Pi);
+bool isUniformMMO(const MachineMemOperand *MMO);
+
+/// \returns The encoding that will be used for \p ByteOffset in the SMRD
+/// offset field.
+int64_t getSMRDEncodedOffset(const MCSubtargetInfo &ST, int64_t ByteOffset);
+
+/// \returns true if this offset is small enough to fit in the SMRD
+/// offset field. \p ByteOffset should be the offset in bytes and
+/// not the encoded offset.
+bool isLegalSMRDImmOffset(const MCSubtargetInfo &ST, int64_t ByteOffset);
+
} // end namespace AMDGPU
} // end namespace llvm
OpenPOWER on IntegriCloud