LLVM 17.0.0git
|
SMEAttrs is a utility class to parse the SME ACLE attributes on functions. More...
#include "Target/AArch64/Utils/AArch64SMEAttributes.h"
Public Types | |
enum | Mask { Normal = 0 , SM_Enabled = 1 << 0 , SM_Compatible = 1 << 1 , SM_Body = 1 << 2 , ZA_Shared = 1 << 3 , ZA_New = 1 << 4 , ZA_Preserved = 1 << 5 , All = ZA_Preserved - 1 } |
Public Member Functions | |
SMEAttrs (unsigned Mask=Normal) | |
SMEAttrs (const Function &F) | |
SMEAttrs (const CallBase &CB) | |
SMEAttrs (const AttributeList &L) | |
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 |
std::optional< bool > | requiresSMChange (const SMEAttrs &Callee, bool BodyOverridesInterface=false) const |
bool | hasNewZAInterface () const |
bool | hasSharedZAInterface () const |
bool | hasPrivateZAInterface () const |
bool | preservesZA () const |
bool | hasZAState () const |
bool | requiresLazySave (const SMEAttrs &Callee) const |
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 line 24 of file AArch64SMEAttributes.h.
enum llvm::SMEAttrs::Mask |
Enumerator | |
---|---|
Normal | |
SM_Enabled | |
SM_Compatible | |
SM_Body | |
ZA_Shared | |
ZA_New | |
ZA_Preserved | |
All |
Definition at line 29 of file AArch64SMEAttributes.h.
Definition at line 40 of file AArch64SMEAttributes.h.
References set().
Definition at line 41 of file AArch64SMEAttributes.h.
Definition at line 29 of file AArch64SMEAttributes.cpp.
References F, llvm::CallBase::getAttributes(), llvm::CallBase::getCalledFunction(), and set().
SMEAttrs::SMEAttrs | ( | const AttributeList & | L | ) |
Definition at line 35 of file AArch64SMEAttributes.cpp.
References SM_Body, SM_Compatible, SM_Enabled, ZA_New, ZA_Preserved, and ZA_Shared.
|
inline |
Definition at line 75 of file AArch64SMEAttributes.h.
References ZA_New.
Referenced by llvm::AArch64TTIImpl::areInlineCompatible(), hasZAState(), and set().
|
inline |
Definition at line 56 of file AArch64SMEAttributes.h.
References hasStreamingCompatibleInterface(), and hasStreamingInterface().
Referenced by hasNonStreamingInterfaceAndBody().
|
inline |
Definition at line 59 of file AArch64SMEAttributes.h.
References hasNonStreamingInterface(), and hasStreamingBody().
Referenced by requiresSMChange().
|
inline |
Definition at line 77 of file AArch64SMEAttributes.h.
References hasSharedZAInterface().
|
inline |
Definition at line 76 of file AArch64SMEAttributes.h.
References ZA_Shared.
Referenced by hasPrivateZAInterface(), hasZAState(), and set().
|
inline |
Definition at line 48 of file AArch64SMEAttributes.h.
References SM_Body.
Referenced by llvm::AArch64::createFastISel(), hasNonStreamingInterfaceAndBody(), and hasStreamingInterfaceOrBody().
|
inline |
Definition at line 53 of file AArch64SMEAttributes.h.
References SM_Compatible.
Referenced by hasNonStreamingInterface(), and set().
|
inline |
Definition at line 49 of file AArch64SMEAttributes.h.
References SM_Enabled.
Referenced by llvm::AArch64::createFastISel(), hasNonStreamingInterface(), hasStreamingInterfaceOrBody(), and set().
|
inline |
Definition at line 50 of file AArch64SMEAttributes.h.
References hasStreamingBody(), and hasStreamingInterface().
Referenced by requiresSMChange().
|
inline |
Definition at line 79 of file AArch64SMEAttributes.h.
References hasNewZAInterface(), and hasSharedZAInterface().
Referenced by llvm::AArch64::createFastISel(), and requiresLazySave().
|
inline |
Definition at line 82 of file AArch64SMEAttributes.h.
References Callee, and hasZAState().
Referenced by llvm::AArch64TTIImpl::areInlineCompatible().
std::optional< bool > SMEAttrs::requiresSMChange | ( | const SMEAttrs & | Callee, |
bool | BodyOverridesInterface = false |
||
) | const |
BodyOverridesInterface
is true and Callee has a streaming body, then requiresSMChange considers a call to Callee as having a Streaming interface. This can be useful when considering e.g. inlining, where we explicitly want the body to overrule the interface (because after inlining the interface is no longer relevant). Definition at line 52 of file AArch64SMEAttributes.cpp.
References Callee, hasNonStreamingInterfaceAndBody(), and hasStreamingInterfaceOrBody().
Referenced by llvm::AArch64TTIImpl::areInlineCompatible().
Definition at line 15 of file AArch64SMEAttributes.cpp.
References assert(), llvm::Enable, hasNewZAInterface(), hasSharedZAInterface(), hasStreamingCompatibleInterface(), hasStreamingInterface(), and preservesZA().
Referenced by SMEAttrs().