[Mlir-commits] [mlir] [mlir][ArmSME] Remove ArmSMETypeConverter (and configure LLVM one instead) (PR #73639)

Cullen Rhodes llvmlistbot at llvm.org
Wed Nov 29 08:48:21 PST 2023


================
@@ -574,10 +573,17 @@ void mlir::configureArmSMEToLLVMConversionLegality(ConversionTarget &target) {
       arm_sme::aarch64_sme_mopa>();
   target.addLegalDialect<arith::ArithDialect>();
   target.addLegalOp<UnrealizedConversionCastOp>();
+  typeConverter.addConversion([&](VectorType type) -> std::optional<Type> {
+    // There's no LLVM type for SME tiles, but after lowering to intrinsics all
+    // SME vector types should be eliminated.
+    if (arm_sme::isValidSMETileVectorType(type))
+      return type;
+    return std::nullopt;
+  });
----------------
c-rhodes wrote:

I meant a separate populate method that's called from configure (based on what I saw in SPIR-V which looked clean), but it's not so important :)

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


More information about the Mlir-commits mailing list