[Mlir-commits] [mlir] [mlir][ArmSME] Make use of backend function attributes for enabling ZA storage (PR #71044)

Benjamin Maxwell llvmlistbot at llvm.org
Mon Nov 6 03:32:56 PST 2023


================
@@ -177,6 +178,39 @@ if(LLVM_ENABLE_PIC)
     target_link_options(mlir_async_runtime PRIVATE "-Wl,-exclude-libs,ALL")
   endif()
 
+  if (MLIR_RUN_ARM_SME_TESTS)
+    if (NOT DEFINED LLVM_MAIN_SRC_DIR)
+      message(FATAL_ERROR "LLVM_MAIN_SRC_DIR must be provided to build the ArmSME runtime.")
+    endif()
+
+    if (NOT DEFINED MLIR_ARM_SME__CAN_ASSEMBLE_ARM_SME)
+      # This should work on an AArch64 host with a recent version of clang.
----------------
MacDue wrote:

Decided not to go with this approach last week. Instead, now within MLIR only stubs for the ABI routines are build (which is enough for our current set of tests to pass, as we don't rely on ZA-enabled functions calling each other). The use of stubs can be overridden by setting `ARM_SME_ABI_ROUTINES_SHLIB` to a path an alternate implementation. 

A later patch could be made to compiler-rt to allow building the SME RT standalone (which would allow us to make use of the actual functions fairly easily).  

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


More information about the Mlir-commits mailing list