LLVM  10.0.0svn
Public Types | Public Member Functions | List of all members
llvm::StackOffset Class Reference

StackOffset is a wrapper around scalable and non-scalable offsets and is used in several functions such as 'isAArch64FrameOffsetLegal' and 'emitFrameOffset()'. More...

#include "Target/AArch64/AArch64StackOffset.h"

Public Types

using Part = std::pair< int64_t, MVT >
 

Public Member Functions

 StackOffset ()
 
 StackOffset (int64_t Offset, MVT::SimpleValueType T)
 
 StackOffset (const StackOffset &Other)
 
StackOffsetoperator= (const StackOffset &)=default
 
StackOffsetoperator+= (const StackOffset::Part &Other)
 
StackOffsetoperator+= (const StackOffset &Other)
 
StackOffset operator+ (const StackOffset &Other) const
 
StackOffsetoperator-= (const StackOffset &Other)
 
StackOffset operator- (const StackOffset &Other) const
 
StackOffset operator- () const
 
int64_t getScalableBytes () const
 Returns the scalable part of the offset in bytes. More...
 
int64_t getBytes () const
 Returns the non-scalable part of the offset in bytes. More...
 
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 describing a frame offset. More...
 
 operator bool () const
 Returns whether the offset is known zero. More...
 
bool isValid () const
 

Detailed Description

StackOffset is a wrapper around scalable and non-scalable offsets and is used in several functions such as 'isAArch64FrameOffsetLegal' and 'emitFrameOffset()'.

StackOffsets are described by MVTs, e.g. StackOffset(1, MVT::nxv16i8) would describe an offset as being the size of a single SVE vector.

The class also implements simple arithmetic (addition/subtraction) on these offsets, e.g. StackOffset(1, MVT::nxv16i8) + StackOffset(1, MVT::i64) describes an offset that spans the combined storage required for an SVE vector and a 64bit GPR.

Definition at line 36 of file AArch64StackOffset.h.

Member Typedef Documentation

◆ Part

using llvm::StackOffset::Part = std::pair<int64_t, MVT>

Definition at line 43 of file AArch64StackOffset.h.

Constructor & Destructor Documentation

◆ StackOffset() [1/3]

llvm::StackOffset::StackOffset ( )
inline

Definition at line 45 of file AArch64StackOffset.h.

◆ StackOffset() [2/3]

llvm::StackOffset::StackOffset ( int64_t  Offset,
MVT::SimpleValueType  T 
)
inline

Definition at line 47 of file AArch64StackOffset.h.

References assert(), and llvm::getSizeInBits().

◆ StackOffset() [3/3]

llvm::StackOffset::StackOffset ( const StackOffset Other)
inline

Definition at line 53 of file AArch64StackOffset.h.

References operator=().

Member Function Documentation

◆ getBytes()

int64_t llvm::StackOffset::getBytes ( ) const
inline

◆ getForFrameOffset()

void llvm::StackOffset::getForFrameOffset ( int64_t &  NumBytes,
int64_t &  NumPredicateVectors,
int64_t &  NumDataVectors 
) const
inline

Returns the offset in parts to which this frame offset can be decomposed for the purpose of describing a frame offset.

For non-scalable offsets this is simply its byte size.

Definition at line 107 of file AArch64StackOffset.h.

References assert(), and isValid().

Referenced by llvm::emitFrameOffset().

◆ getScalableBytes()

int64_t llvm::StackOffset::getScalableBytes ( ) const
inline

Returns the scalable part of the offset in bytes.

Definition at line 99 of file AArch64StackOffset.h.

Referenced by llvm::isAArch64FrameOffsetLegal(), and llvm::AArch64FrameLowering::resolveFrameOffsetReference().

◆ isValid()

bool llvm::StackOffset::isValid ( ) const
inline

Definition at line 128 of file AArch64StackOffset.h.

Referenced by getForFrameOffset().

◆ operator bool()

llvm::StackOffset::operator bool ( ) const
inlineexplicit

Returns whether the offset is known zero.

Definition at line 126 of file AArch64StackOffset.h.

◆ operator+()

StackOffset llvm::StackOffset::operator+ ( const StackOffset Other) const
inline

Definition at line 73 of file AArch64StackOffset.h.

◆ operator+=() [1/2]

StackOffset& llvm::StackOffset::operator+= ( const StackOffset::Part Other)
inline

Definition at line 58 of file AArch64StackOffset.h.

◆ operator+=() [2/2]

StackOffset& llvm::StackOffset::operator+= ( const StackOffset Other)
inline

Definition at line 67 of file AArch64StackOffset.h.

◆ operator-() [1/2]

StackOffset llvm::StackOffset::operator- ( const StackOffset Other) const
inline

Definition at line 85 of file AArch64StackOffset.h.

◆ operator-() [2/2]

StackOffset llvm::StackOffset::operator- ( ) const
inline

Definition at line 91 of file AArch64StackOffset.h.

References Other.

◆ operator-=()

StackOffset& llvm::StackOffset::operator-= ( const StackOffset Other)
inline

Definition at line 79 of file AArch64StackOffset.h.

◆ operator=()

StackOffset& llvm::StackOffset::operator= ( const StackOffset )
default

Referenced by StackOffset().


The documentation for this class was generated from the following file: