[Mlir-commits] [mlir] [mlir][ArmSME] Switch to an attribute-based tile allocation scheme (PR #73253)

Cullen Rhodes llvmlistbot at llvm.org
Mon Nov 27 02:40:56 PST 2023


================
@@ -32,24 +32,41 @@ using namespace mlir;
 
 namespace {
 
+IntegerAttr getTileIdOrError(arm_sme::ArmSMETileOpInterface op) {
+  auto tileId = op.getTileId();
+  if (!tileId)
+    op.emitOpError(
+        "expected tile ID to be allocated before conversion to LLVM");
+  return tileId;
+}
+
+struct GetTileConversion : public ConvertOpToLLVMPattern<arm_sme::GetTileOp> {
+  using ConvertOpToLLVMPattern<arm_sme::GetTileOp>::ConvertOpToLLVMPattern;
+
+  LogicalResult
+  matchAndRewrite(arm_sme::GetTileOp getTile, OpAdaptor,
+                  ConversionPatternRewriter &rewriter) const override {
+    rewriter.replaceOpWithNewOp<arm_sme::MaterializeSSATileOp>(
----------------
c-rhodes wrote:

Could `arm_sme.materialize_ssa_tile` be replaced with `llvm.mlir.undef`?

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


More information about the Mlir-commits mailing list