Movatterモバイル変換


[0]ホーム

URL:


LLVM 20.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,ZA_Shift = 5,ZA_Mask = 0b111 << ZA_Shift,
  ZT0_Shift = 8,ZT0_Mask = 0b111 << ZT0_Shift
}
 

Public Member Functions

 SMEAttrs (unsignedMask=Normal)
 
 SMEAttrs (constFunction &F)
 
 SMEAttrs (constCallBase &CB)
 
 SMEAttrs (constAttributeList &L)
 
 SMEAttrs (StringRef FuncName)
 
void set (unsigned M,boolEnable=true)
 
bool hasStreamingBody ()const
 
bool hasStreamingInterface ()const
 
bool hasStreamingInterfaceOrBody ()const
 
bool hasStreamingCompatibleInterface ()const
 
bool hasNonStreamingInterface ()const
 
bool hasNonStreamingInterfaceAndBody ()const
 
bool requiresSMChange (constSMEAttrs &Callee)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 requiresLazySave (constSMEAttrs &Callee)const
 
bool isNewZT0 ()const
 
bool isInZT0 ()const
 
bool isOutZT0 ()const
 
bool isInOutZT0 ()const
 
bool isPreservesZT0 ()const
 
bool sharesZT0 ()const
 
bool hasZT0State ()const
 
bool requiresPreservingZT0 (constSMEAttrs &Callee)const
 
bool requiresDisablingZABeforeCall (constSMEAttrs &Callee)const
 
bool requiresEnablingZAAfterCall (constSMEAttrs &Callee)const
 
bool requiresPreservingAllZAState (constSMEAttrs &Callee)const
 

Static Public Member Functions

staticStateValue decodeZAState (unsigned Bitmask)
 
staticunsigned encodeZAState (StateValue S)
 
staticStateValue decodeZT0State (unsigned Bitmask)
 
staticunsigned 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. It has interfaces to query whether a streaming mode change or lazy-save mechanism is required when going from one function to another (e.g. through a call).

Definition at line25 of fileAArch64SMEAttributes.h.

Member Enumeration Documentation

◆ Mask

enumllvm::SMEAttrs::Mask
Enumerator
Normal 
SM_Enabled 
SM_Compatible 
SM_Body 
SME_ABI_Routine 
ZA_State_Agnostic 
ZA_Shift 
ZA_Mask 
ZT0_Shift 
ZT0_Mask 

Definition at line39 of fileAArch64SMEAttributes.h.

◆ StateValue

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

Definition at line29 of fileAArch64SMEAttributes.h.

Constructor & Destructor Documentation

◆ SMEAttrs()[1/5]

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

Definition at line52 of fileAArch64SMEAttributes.h.

Referencesset().

◆ SMEAttrs()[2/5]

llvm::SMEAttrs::SMEAttrs(constFunctionF)
inline

Definition at line53 of fileAArch64SMEAttributes.h.

◆ SMEAttrs()[3/5]

SMEAttrs::SMEAttrs(constCallBaseCB)

Definition at line47 of fileAArch64SMEAttributes.cpp.

ReferencesF,llvm::CallBase::getAttributes(),llvm::CallBase::getCalledFunction(), andset().

◆ SMEAttrs()[4/5]

SMEAttrs::SMEAttrs(constAttributeListL)

Definition at line68 of fileAArch64SMEAttributes.cpp.

ReferencesencodeZAState(),encodeZT0State(),In,InOut,New,Out,Preserved,SM_Body,SM_Compatible,SM_Enabled, andZA_State_Agnostic.

◆ SMEAttrs()[5/5]

SMEAttrs::SMEAttrs(StringRef FuncName)

Definition at line54 of fileAArch64SMEAttributes.cpp.

ReferencesencodeZAState(),In,SM_Compatible, andSME_ABI_Routine.

Member Function Documentation

◆ decodeZAState()

staticStateValue llvm::SMEAttrs::decodeZAState(unsigned Bitmask)
inlinestatic

Definition at line81 of fileAArch64SMEAttributes.h.

ReferencesZA_Mask, andZA_Shift.

Referenced byisInOutZA(),isInZA(),isNewZA(),isOutZA(),isPreservesZA(), andsharesZA().

◆ decodeZT0State()

staticStateValue llvm::SMEAttrs::decodeZT0State(unsigned Bitmask)
inlinestatic

Definition at line112 of fileAArch64SMEAttributes.h.

ReferencesZT0_Mask, andZT0_Shift.

Referenced byisInOutZT0(),isInZT0(),isNewZT0(),isOutZT0(),isPreservesZT0(), andsharesZT0().

◆ encodeZAState()

staticunsigned llvm::SMEAttrs::encodeZAState(StateValue S)
inlinestatic

Definition at line84 of fileAArch64SMEAttributes.h.

ReferencesZA_Shift.

Referenced bySMEAttrs().

◆ encodeZT0State()

staticunsigned llvm::SMEAttrs::encodeZT0State(StateValue S)
inlinestatic

Definition at line115 of fileAArch64SMEAttributes.h.

ReferencesZT0_Shift.

Referenced bySMEAttrs().

◆ hasAgnosticZAInterface()

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

Definition at line100 of fileAArch64SMEAttributes.h.

ReferencesZA_State_Agnostic.

Referenced byllvm::AArch64::createFastISel(),hasPrivateZAInterface(),requiresPreservingAllZAState(), andset().

◆ hasNonStreamingInterface()

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

Definition at line69 of fileAArch64SMEAttributes.h.

ReferenceshasStreamingCompatibleInterface(), andhasStreamingInterface().

Referenced bygetSMCondition(), andhasNonStreamingInterfaceAndBody().

◆ hasNonStreamingInterfaceAndBody()

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

Definition at line72 of fileAArch64SMEAttributes.h.

ReferenceshasNonStreamingInterface(), andhasStreamingBody().

Referenced byrequiresSMChange().

◆ hasPrivateZAInterface()

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

Definition at line102 of fileAArch64SMEAttributes.h.

ReferenceshasAgnosticZAInterface(), andhasSharedZAInterface().

◆ hasSharedZAInterface()

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

Definition at line101 of fileAArch64SMEAttributes.h.

ReferencessharesZA(), andsharesZT0().

Referenced byhasPrivateZAInterface(), andset().

◆ hasStreamingBody()

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

Definition at line61 of fileAArch64SMEAttributes.h.

ReferencesSM_Body.

Referenced byllvm::AArch64TTIImpl::areInlineCompatible(),emitVGSaveRestore(),enableMultiVectorSpillFill(),getSMCondition(),hasNonStreamingInterfaceAndBody(), andhasStreamingInterfaceOrBody().

◆ hasStreamingCompatibleInterface()

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

Definition at line66 of fileAArch64SMEAttributes.h.

ReferencesSM_Compatible.

Referenced byllvm::AArch64::createFastISel(),getSMCondition(),hasNonStreamingInterface(), andset().

◆ hasStreamingInterface()

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

Definition at line62 of fileAArch64SMEAttributes.h.

ReferencesSM_Enabled.

Referenced byemitVGSaveRestore(),enableMultiVectorSpillFill(),getSMCondition(),hasNonStreamingInterface(),hasStreamingInterfaceOrBody(), andset().

◆ hasStreamingInterfaceOrBody()

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

Definition at line63 of fileAArch64SMEAttributes.h.

ReferenceshasStreamingBody(), andhasStreamingInterface().

Referenced byllvm::AArch64::createFastISel(), andrequiresSMChange().

◆ hasZAState()

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

Definition at line105 of fileAArch64SMEAttributes.h.

ReferencesisNewZA(), andsharesZA().

Referenced byllvm::AArch64::createFastISel(),requiresDisablingZABeforeCall(), andrequiresLazySave().

◆ hasZT0State()

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

Definition at line133 of fileAArch64SMEAttributes.h.

ReferencesisNewZT0(), andsharesZT0().

Referenced byllvm::AArch64::createFastISel(),requiresDisablingZABeforeCall(), andrequiresPreservingZT0().

◆ isInOutZA()

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

Definition at line91 of fileAArch64SMEAttributes.h.

ReferencesdecodeZAState(), andInOut.

Referenced byset().

◆ isInOutZT0()

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

Definition at line122 of fileAArch64SMEAttributes.h.

ReferencesdecodeZT0State(), andInOut.

Referenced byset().

◆ isInZA()

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

Definition at line89 of fileAArch64SMEAttributes.h.

ReferencesdecodeZAState(), andIn.

Referenced byset().

◆ isInZT0()

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

Definition at line120 of fileAArch64SMEAttributes.h.

ReferencesdecodeZT0State(), andIn.

Referenced byset().

◆ isNewZA()

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

Definition at line88 of fileAArch64SMEAttributes.h.

ReferencesdecodeZAState(), andNew.

Referenced byllvm::AArch64TTIImpl::areInlineCompatible(),hasZAState(), andset().

◆ isNewZT0()

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

Definition at line119 of fileAArch64SMEAttributes.h.

ReferencesdecodeZT0State(), andNew.

Referenced byllvm::AArch64TTIImpl::areInlineCompatible(),hasZT0State(), andset().

◆ isOutZA()

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

Definition at line90 of fileAArch64SMEAttributes.h.

ReferencesdecodeZAState(), andOut.

Referenced byset().

◆ isOutZT0()

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

Definition at line121 of fileAArch64SMEAttributes.h.

ReferencesdecodeZT0State(), andOut.

Referenced byset().

◆ isPreservesZA()

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

Definition at line92 of fileAArch64SMEAttributes.h.

ReferencesdecodeZAState(), andPreserved.

Referenced byset().

◆ isPreservesZT0()

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

Definition at line125 of fileAArch64SMEAttributes.h.

ReferencesdecodeZT0State(), andPreserved.

Referenced byset().

◆ requiresDisablingZABeforeCall()

bool llvm::SMEAttrs::requiresDisablingZABeforeCall(constSMEAttrsCallee) const
inline

Definition at line138 of fileAArch64SMEAttributes.h.

ReferenceshasZAState(),hasZT0State(), andSME_ABI_Routine.

Referenced byrequiresEnablingZAAfterCall().

◆ requiresEnablingZAAfterCall()

bool llvm::SMEAttrs::requiresEnablingZAAfterCall(constSMEAttrsCallee) const
inline

Definition at line142 of fileAArch64SMEAttributes.h.

ReferencesrequiresDisablingZABeforeCall(), andrequiresLazySave().

◆ requiresLazySave()

bool llvm::SMEAttrs::requiresLazySave(constSMEAttrsCallee) const
inline

Definition at line106 of fileAArch64SMEAttributes.h.

ReferenceshasZAState(), andSME_ABI_Routine.

Referenced byrequiresEnablingZAAfterCall().

◆ requiresPreservingAllZAState()

bool llvm::SMEAttrs::requiresPreservingAllZAState(constSMEAttrsCallee) const
inline

Definition at line145 of fileAArch64SMEAttributes.h.

ReferenceshasAgnosticZAInterface(), andSME_ABI_Routine.

◆ requiresPreservingZT0()

bool llvm::SMEAttrs::requiresPreservingZT0(constSMEAttrsCallee) const
inline

Definition at line134 of fileAArch64SMEAttributes.h.

ReferenceshasZT0State().

◆ requiresSMChange()

bool SMEAttrs::requiresSMChange(constSMEAttrsCallee) const
Returns
true if a call from Caller -> Callee requires a change in streaming mode.

Definition at line100 of fileAArch64SMEAttributes.cpp.

ReferenceshasNonStreamingInterfaceAndBody(), andhasStreamingInterfaceOrBody().

Referenced byllvm::AArch64TTIImpl::getInlineCallPenalty().

◆ set()

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

Definition at line15 of fileAArch64SMEAttributes.cpp.

Referencesassert(),llvm::Enable,hasAgnosticZAInterface(),hasSharedZAInterface(),hasStreamingCompatibleInterface(),hasStreamingInterface(),isInOutZA(),isInOutZT0(),isInZA(),isInZT0(),isNewZA(),isNewZT0(),isOutZA(),isOutZT0(),isPreservesZA(),isPreservesZT0(),sharesZA(),sharesZT0(), andSME_ABI_Routine.

Referenced byllvm::AArch64TTIImpl::areInlineCompatible(), andSMEAttrs().

◆ sharesZA()

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

Definition at line95 of fileAArch64SMEAttributes.h.

ReferencesdecodeZAState(),In,InOut,Out, andPreserved.

Referenced byhasSharedZAInterface(),hasZAState(), andset().

◆ sharesZT0()

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

Definition at line128 of fileAArch64SMEAttributes.h.

ReferencesdecodeZT0State(),In,InOut,Out, andPreserved.

Referenced byhasSharedZAInterface(),hasZT0State(), andset().


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

Generated on Sun Jul 20 2025 19:53:32 for LLVM by doxygen 1.9.6
[8]ページ先頭

©2009-2025 Movatter.jp