LLVM 22.0.0git
Public Types | Public Member Functions | Static Public Member Functions | List of all members
llvm::SMEAttrs Class Reference

SMEAttrs is a utility class to parse the SME ACLE attributes on functions. More...

#include "Target/AArch64/Utils/AArch64SMEAttributes.h"

Public Types

enum class  StateValue {
  None = 0 , In = 1 , Out = 2 , InOut = 3 ,
  Preserved = 4 , New = 5
}
 
enum  Mask {
  Normal = 0 , SM_Enabled = 1 << 0 , SM_Compatible = 1 << 1 , SM_Body = 1 << 2 ,
  SME_ABI_Routine = 1 << 3 , ZA_State_Agnostic = 1 << 4 , ZT0_Undef = 1 << 5 , ZA_Shift = 6 ,
  ZA_Mask = 0b111 << ZA_Shift , ZT0_Shift = 9 , ZT0_Mask = 0b111 << ZT0_Shift , CallSiteFlags_Mask = ZT0_Undef
}
 

Public Member Functions

 SMEAttrs ()=default
 
 SMEAttrs (unsigned Mask)
 
 SMEAttrs (const Function &F, const AArch64TargetLowering *TLI=nullptr)
 
 SMEAttrs (const AttributeList &L)
 
 SMEAttrs (StringRef FuncName, const AArch64TargetLowering &TLI)
 
void set (unsigned M, bool Enable=true)
 
bool hasStreamingBody () const
 
bool hasStreamingInterface () const
 
bool hasStreamingInterfaceOrBody () const
 
bool hasStreamingCompatibleInterface () const
 
bool hasNonStreamingInterface () const
 
bool hasNonStreamingInterfaceAndBody () const
 
bool isNewZA () const
 
bool isInZA () const
 
bool isOutZA () const
 
bool isInOutZA () const
 
bool isPreservesZA () const
 
bool sharesZA () const
 
bool hasAgnosticZAInterface () const
 
bool hasSharedZAInterface () const
 
bool hasPrivateZAInterface () const
 
bool hasZAState () const
 
bool isSMEABIRoutine () const
 
bool isNewZT0 () const
 
bool isInZT0 () const
 
bool isOutZT0 () const
 
bool isInOutZT0 () const
 
bool isPreservesZT0 () const
 
bool hasUndefZT0 () const
 
bool sharesZT0 () const
 
bool hasZT0State () const
 
SMEAttrs operator| (SMEAttrs Other) const
 
SMEAttrs withoutPerCallsiteFlags () const
 
bool operator== (SMEAttrs const &Other) const
 

Static Public Member Functions

static StateValue decodeZAState (unsigned Bitmask)
 
static unsigned encodeZAState (StateValue S)
 
static StateValue decodeZT0State (unsigned Bitmask)
 
static unsigned encodeZT0State (StateValue S)
 

Detailed Description

SMEAttrs is a utility class to parse the SME ACLE attributes on functions.

It helps determine a function's requirements for PSTATE.ZA and PSTATE.SM.

Definition at line 24 of file AArch64SMEAttributes.h.

Member Enumeration Documentation

◆ Mask

Enumerator
Normal 
SM_Enabled 
SM_Compatible 
SM_Body 
SME_ABI_Routine 
ZA_State_Agnostic 
ZT0_Undef 
ZA_Shift 
ZA_Mask 
ZT0_Shift 
ZT0_Mask 
CallSiteFlags_Mask 

Definition at line 38 of file AArch64SMEAttributes.h.

◆ StateValue

enum class llvm::SMEAttrs::StateValue
strong
Enumerator
None 
In 
Out 
InOut 
Preserved 
New 

Definition at line 28 of file AArch64SMEAttributes.h.

Constructor & Destructor Documentation

◆ SMEAttrs() [1/5]

llvm::SMEAttrs::SMEAttrs ( )
default

◆ SMEAttrs() [2/5]

llvm::SMEAttrs::SMEAttrs ( unsigned  Mask)
inline

Definition at line 54 of file AArch64SMEAttributes.h.

References set().

◆ SMEAttrs() [3/5]

llvm::SMEAttrs::SMEAttrs ( const Function F,
const AArch64TargetLowering TLI = nullptr 
)
inline

Definition at line 55 of file AArch64SMEAttributes.h.

References F.

◆ SMEAttrs() [4/5]

SMEAttrs::SMEAttrs ( const AttributeList L)

◆ SMEAttrs() [5/5]

llvm::SMEAttrs::SMEAttrs ( StringRef  FuncName,
const AArch64TargetLowering TLI 
)
inline

Definition at line 61 of file AArch64SMEAttributes.h.

Member Function Documentation

◆ decodeZAState()

static StateValue llvm::SMEAttrs::decodeZAState ( unsigned  Bitmask)
inlinestatic

Definition at line 92 of file AArch64SMEAttributes.h.

References ZA_Mask, and ZA_Shift.

Referenced by isInOutZA(), isInZA(), isNewZA(), isOutZA(), isPreservesZA(), and sharesZA().

◆ decodeZT0State()

static StateValue llvm::SMEAttrs::decodeZT0State ( unsigned  Bitmask)
inlinestatic

Definition at line 120 of file AArch64SMEAttributes.h.

References ZT0_Mask, and ZT0_Shift.

Referenced by isInOutZT0(), isInZT0(), isNewZT0(), isOutZT0(), isPreservesZT0(), and sharesZT0().

◆ encodeZAState()

static unsigned llvm::SMEAttrs::encodeZAState ( StateValue  S)
inlinestatic

Definition at line 95 of file AArch64SMEAttributes.h.

References ZA_Shift.

Referenced by SMEAttrs().

◆ encodeZT0State()

static unsigned llvm::SMEAttrs::encodeZT0State ( StateValue  S)
inlinestatic

Definition at line 123 of file AArch64SMEAttributes.h.

References ZT0_Shift.

Referenced by SMEAttrs().

◆ hasAgnosticZAInterface()

bool llvm::SMEAttrs::hasAgnosticZAInterface ( ) const
inline

◆ hasNonStreamingInterface()

bool llvm::SMEAttrs::hasNonStreamingInterface ( ) const
inline

◆ hasNonStreamingInterfaceAndBody()

bool llvm::SMEAttrs::hasNonStreamingInterfaceAndBody ( ) const
inline

◆ hasPrivateZAInterface()

bool llvm::SMEAttrs::hasPrivateZAInterface ( ) const
inline

◆ hasSharedZAInterface()

bool llvm::SMEAttrs::hasSharedZAInterface ( ) const
inline

Definition at line 112 of file AArch64SMEAttributes.h.

References sharesZA(), and sharesZT0().

Referenced by hasPrivateZAInterface().

◆ hasStreamingBody()

bool llvm::SMEAttrs::hasStreamingBody ( ) const
inline

◆ hasStreamingCompatibleInterface()

bool llvm::SMEAttrs::hasStreamingCompatibleInterface ( ) const
inline

◆ hasStreamingInterface()

bool llvm::SMEAttrs::hasStreamingInterface ( ) const
inline

◆ hasStreamingInterfaceOrBody()

bool llvm::SMEAttrs::hasStreamingInterfaceOrBody ( ) const
inline

◆ hasUndefZT0()

bool llvm::SMEAttrs::hasUndefZT0 ( ) const
inline

Definition at line 136 of file AArch64SMEAttributes.h.

References ZT0_Undef.

Referenced by llvm::SMECallAttrs::requiresPreservingZT0().

◆ hasZAState()

bool llvm::SMEAttrs::hasZAState ( ) const
inline

◆ hasZT0State()

bool llvm::SMEAttrs::hasZT0State ( ) const
inline

◆ isInOutZA()

bool llvm::SMEAttrs::isInOutZA ( ) const
inline

Definition at line 102 of file AArch64SMEAttributes.h.

References decodeZAState(), and InOut.

◆ isInOutZT0()

bool llvm::SMEAttrs::isInOutZT0 ( ) const
inline

Definition at line 130 of file AArch64SMEAttributes.h.

References decodeZT0State(), and InOut.

◆ isInZA()

bool llvm::SMEAttrs::isInZA ( ) const
inline

Definition at line 100 of file AArch64SMEAttributes.h.

References decodeZAState(), and In.

◆ isInZT0()

bool llvm::SMEAttrs::isInZT0 ( ) const
inline

Definition at line 128 of file AArch64SMEAttributes.h.

References decodeZT0State(), and In.

◆ isNewZA()

bool llvm::SMEAttrs::isNewZA ( ) const
inline

Definition at line 99 of file AArch64SMEAttributes.h.

References decodeZAState(), and New.

Referenced by llvm::AArch64TTIImpl::areInlineCompatible(), and hasZAState().

◆ isNewZT0()

bool llvm::SMEAttrs::isNewZT0 ( ) const
inline

Definition at line 127 of file AArch64SMEAttributes.h.

References decodeZT0State(), and New.

Referenced by llvm::AArch64TTIImpl::areInlineCompatible(), and hasZT0State().

◆ isOutZA()

bool llvm::SMEAttrs::isOutZA ( ) const
inline

Definition at line 101 of file AArch64SMEAttributes.h.

References decodeZAState(), and Out.

◆ isOutZT0()

bool llvm::SMEAttrs::isOutZT0 ( ) const
inline

Definition at line 129 of file AArch64SMEAttributes.h.

References decodeZT0State(), and Out.

◆ isPreservesZA()

bool llvm::SMEAttrs::isPreservesZA ( ) const
inline

Definition at line 103 of file AArch64SMEAttributes.h.

References decodeZAState(), and Preserved.

◆ isPreservesZT0()

bool llvm::SMEAttrs::isPreservesZT0 ( ) const
inline

Definition at line 133 of file AArch64SMEAttributes.h.

References decodeZT0State(), and Preserved.

◆ isSMEABIRoutine()

bool llvm::SMEAttrs::isSMEABIRoutine ( ) const
inline

◆ operator==()

bool llvm::SMEAttrs::operator== ( SMEAttrs const Other) const
inline

Definition at line 154 of file AArch64SMEAttributes.h.

References llvm::Other.

◆ operator|()

SMEAttrs llvm::SMEAttrs::operator| ( SMEAttrs  Other) const
inline

Definition at line 144 of file AArch64SMEAttributes.h.

References llvm::Other, and set().

◆ set()

void llvm::SMEAttrs::set ( unsigned  M,
bool  Enable = true 
)
inline

Definition at line 65 of file AArch64SMEAttributes.h.

References llvm::Enable.

Referenced by llvm::AArch64TTIImpl::areInlineCompatible(), operator|(), and SMEAttrs().

◆ sharesZA()

bool llvm::SMEAttrs::sharesZA ( ) const
inline

Definition at line 106 of file AArch64SMEAttributes.h.

References decodeZAState(), In, InOut, Out, and Preserved.

Referenced by hasSharedZAInterface(), and hasZAState().

◆ sharesZT0()

bool llvm::SMEAttrs::sharesZT0 ( ) const
inline

◆ withoutPerCallsiteFlags()

SMEAttrs llvm::SMEAttrs::withoutPerCallsiteFlags ( ) const
inline

Definition at line 150 of file AArch64SMEAttributes.h.

References CallSiteFlags_Mask.

Referenced by llvm::SMECallAttrs::SMECallAttrs().


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