[llvm] Reland "[AArch64][SME] Port all SME routines to RuntimeLibcalls" (PR #153417)

Benjamin Maxwell via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 17 06:32:59 PDT 2025


================
@@ -77,19 +79,42 @@ SMEAttrs::SMEAttrs(const AttributeList &Attrs) {
     Bitmask |= encodeZT0State(StateValue::New);
 }
 
-void SMEAttrs::addKnownFunctionAttrs(StringRef FuncName) {
+void SMEAttrs::addKnownFunctionAttrs(StringRef FuncName,
+                                     const TargetLowering &TLI) {
+  struct SMERoutineAttr {
+    RTLIB::Libcall LC{RTLIB::UNKNOWN_LIBCALL};
+    unsigned Attrs{SMEAttrs::Normal};
+  };
+
+  static constexpr unsigned SMCompatiableABIRoutine =
+      SMEAttrs::SM_Compatible | SMEAttrs::SME_ABI_Routine;
+  static constexpr unsigned SMCompatiableABIRoutineInZA =
+      SMCompatiableABIRoutine | encodeZAState(StateValue::In);
+
+  // Table of SME routine -> Known attributes.
+  static constexpr SMERoutineAttr SMERoutineAttrs[]{
----------------
MacDue wrote:

Looks like the performance is fine now 👍

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


More information about the llvm-commits mailing list