[Mlir-commits] [mlir] [mlir][ArmSME] Skip tile allocation for functions with no SME tile values (PR #227153)

Benjamin Maxwell llvmlistbot at llvm.org
Tue Sep 29 00:51:14 PDT 2026


================
@@ -800,12 +800,45 @@ struct TestTileAllocationPass
 };
 } // namespace
 
+/// Returns true if `function` contains any SME tile values, either as block
+/// arguments (e.g., function arguments, or arguments to blocks merging values
+/// from different paths) or as results of operations.
+static bool functionHasSMETileValues(FunctionOpInterface function) {
+  auto hasSMETileType = [](TypeRange types) {
+    return llvm::any_of(
+        types, [](Type type) { return isValidSMETileVectorType(type); });
+  };
+
+  bool hasSMETileValues = false;
+  function.walk([&](Block *block) -> WalkResult {
----------------
MacDue wrote:

Is this walk nesscesary? If a block has tile block arguments there should be branches to that block with tile operands.

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


More information about the Mlir-commits mailing list