14 #ifndef LLVM_LIB_TARGET_AARCH64_AARCH64STACKOFFSET_H 15 #define LLVM_LIB_TARGET_AARCH64_AARCH64STACKOFFSET_H 39 int64_t ScalableBytes;
41 explicit operator int()
const;
44 using Part = std::pair<int64_t, MVT>;
49 assert(
MVT(T).isByteSized() &&
"Offset type is not a multiple of bytes");
50 *
this +=
Part(Offset, T);
54 : Bytes(Other.Bytes), ScalableBytes(Other.ScalableBytes) {}
63 Bytes += Other.first * ((int64_t)Size.
getFixedSize() / 8);
69 ScalableBytes += Other.ScalableBytes;
81 ScalableBytes -= Other.ScalableBytes;
108 int64_t &NumDataVectors)
const {
113 NumPredicateVectors = ScalableBytes / 2;
118 if (NumPredicateVectors % 8 == 0 || NumPredicateVectors < -64 ||
119 NumPredicateVectors > 62) {
120 NumDataVectors = NumPredicateVectors / 8;
121 NumPredicateVectors -= NumDataVectors * 8;
126 explicit operator bool()
const {
return Bytes || ScalableBytes; }
132 return ScalableBytes % 2 == 0;
StackOffset & operator+=(const StackOffset &Other)
StackOffset operator-() const
StackOffset is a wrapper around scalable and non-scalable offsets and is used in several functions su...
StackOffset & operator=(const StackOffset &)=default
This class represents lattice values for constants.
StackOffset & operator+=(const StackOffset::Part &Other)
std::pair< int64_t, MVT > Part
int64_t getScalableBytes() const
Returns the scalable part of the offset in bytes.
int64_t getBytes() const
Returns the non-scalable part of the offset in bytes.
uint64_t getFixedSize() const
void getForFrameOffset(int64_t &NumBytes, int64_t &NumPredicateVectors, int64_t &NumDataVectors) const
Returns the offset in parts to which this frame offset can be decomposed for the purpose of describin...
StackOffset operator+(const StackOffset &Other) const
StackOffset & operator-=(const StackOffset &Other)
StackOffset operator-(const StackOffset &Other) const
StackOffset(int64_t Offset, MVT::SimpleValueType T)
uint64_t getKnownMinSize() const
StackOffset(const StackOffset &Other)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())