[llvm] [AArch64][SME] Split SMECallAttrs out of SMEAttrs (PR #137239)

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 25 06:40:42 PDT 2025


================
@@ -43,18 +40,24 @@ class SMEAttrs {
     SM_Body = 1 << 2,         // aarch64_pstate_sm_body
     SME_ABI_Routine = 1 << 3, // Used for SME ABI routines to avoid lazy saves
     ZA_State_Agnostic = 1 << 4,
-    ZT0_Undef = 1 << 5,       // Use to mark ZT0 as undef to avoid spills
+    ZT0_Undef = 1 << 5, // Use to mark ZT0 as undef to avoid spills
     ZA_Shift = 6,
     ZA_Mask = 0b111 << ZA_Shift,
     ZT0_Shift = 9,
-    ZT0_Mask = 0b111 << ZT0_Shift
+    ZT0_Mask = 0b111 << ZT0_Shift,
+    Callsite_Flags = ZT0_Undef
   };
 
-  SMEAttrs(unsigned Mask = Normal) : Bitmask(0) { set(Mask); }
-  SMEAttrs(const Function &F) : SMEAttrs(F.getAttributes()) {}
-  SMEAttrs(const CallBase &CB);
+  SMEAttrs() = default;
+  SMEAttrs(unsigned Mask) { set(Mask); }
+  SMEAttrs(const Function *F)
+      : SMEAttrs(F ? F->getAttributes() : AttributeList()) {
+    if (F)
+      addKnownFunctionAttrs(F->getName());
+  }
+  SMEAttrs(const Function &F) : SMEAttrs(&F) {}
----------------
sdesmalen-arm wrote:

Do we need both?

https://github.com/llvm/llvm-project/pull/137239


More information about the llvm-commits mailing list