diff --git a/mlir/include/mlir/Dialect/Bufferization/Transforms/Passes.td b/mlir/include/mlir/Dialect/Bufferization/Transforms/Passes.td --- a/mlir/include/mlir/Dialect/Bufferization/Transforms/Passes.td +++ b/mlir/include/mlir/Dialect/Bufferization/Transforms/Passes.td @@ -67,7 +67,7 @@ args_out = 1 : i64, indexing_maps = [#map0, #map0], iterator_types = ["parallel"]} %arg1, %1 { - ^bb0(%arg3: f32, %arg4: f32): // no predecessors + ^bb0(%arg3: f32, %arg4: f32): %4 = exp %arg3 : f32 linalg.yield %4 : f32 }: memref<2xf32>, memref<2xf32> diff --git a/mlir/include/mlir/Dialect/SCF/Passes.td b/mlir/include/mlir/Dialect/SCF/Passes.td --- a/mlir/include/mlir/Dialect/SCF/Passes.td +++ b/mlir/include/mlir/Dialect/SCF/Passes.td @@ -104,7 +104,7 @@ %1 = arith.cmpi slt, %i, %arg1 : index scf.condition(%1) %i : index } do { - ^bb0(%i: index): // no predecessors + ^bb0(%i: index): %1 = arith.addi %i, %c1 : index %2 = arith.addi %arg2, %arg2 : i32 memref.store %2, %arg0[%i] : memref diff --git a/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp b/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp --- a/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp +++ b/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp @@ -554,7 +554,7 @@ /// Canonicalizes the pattern of the form /// /// %tensor = tensor.generate %x { -/// ^bb0(%arg0: index): // no predecessors +/// ^bb0(%arg0: index): /// /// yield %1 : index /// } : tensor diff --git a/mlir/lib/IR/AsmPrinter.cpp b/mlir/lib/IR/AsmPrinter.cpp --- a/mlir/lib/IR/AsmPrinter.cpp +++ b/mlir/lib/IR/AsmPrinter.cpp @@ -2653,7 +2653,8 @@ if (!block->getParent()) { os << " // block is not in a region!"; } else if (block->hasNoPredecessors()) { - os << " // no predecessors"; + if (!block->isEntryBlock()) + os << " // no predecessors"; } else if (auto *pred = block->getSinglePredecessor()) { os << " // pred: "; printBlockName(pred); diff --git a/mlir/test/Conversion/OpenMPToLLVM/convert-to-llvmir.mlir b/mlir/test/Conversion/OpenMPToLLVM/convert-to-llvmir.mlir --- a/mlir/test/Conversion/OpenMPToLLVM/convert-to-llvmir.mlir +++ b/mlir/test/Conversion/OpenMPToLLVM/convert-to-llvmir.mlir @@ -51,7 +51,7 @@ omp.parallel { // CHECK: omp.wsloop (%[[ARG6:.*]], %[[ARG7:.*]]) : i64 = (%[[ARG0]], %[[ARG1]]) to (%[[ARG2]], %[[ARG3]]) step (%[[ARG4]], %[[ARG5]]) { "omp.wsloop"(%arg0, %arg1, %arg2, %arg3, %arg4, %arg5) ({ - ^bb0(%arg6: index, %arg7: index): // no predecessors + ^bb0(%arg6: index, %arg7: index): // CHECK-DAG: %[[CAST_ARG6:.*]] = builtin.unrealized_conversion_cast %[[ARG6]] : i64 to index // CHECK-DAG: %[[CAST_ARG7:.*]] = builtin.unrealized_conversion_cast %[[ARG7]] : i64 to index // CHECK: "test.payload"(%[[CAST_ARG6]], %[[CAST_ARG7]]) : (index, index) -> () diff --git a/mlir/test/Conversion/SCFToStandard/convert-to-cfg.mlir b/mlir/test/Conversion/SCFToStandard/convert-to-cfg.mlir --- a/mlir/test/Conversion/SCFToStandard/convert-to-cfg.mlir +++ b/mlir/test/Conversion/SCFToStandard/convert-to-cfg.mlir @@ -473,7 +473,7 @@ scf.condition(%0) %2, %3 : i64, f64 } do { // CHECK: ^[[AFTER]](%[[ARG4:.*]]: i64, %[[ARG5:.*]]: f64): - ^bb0(%arg2: i64, %arg3: f64): // no predecessors + ^bb0(%arg2: i64, %arg3: f64): // CHECK: br ^[[BEFORE]](%{{.*}}, %{{.*}} : i32, f32) scf.yield %c0_i32, %cst : i32, f32 } diff --git a/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir b/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir --- a/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir +++ b/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir @@ -419,7 +419,7 @@ // CHECK: [[DEPTH:%.+]] = linalg.depthwise_conv_2d_nhwc_hwcm {dilations = dense<1> : tensor<2xi64>, strides = dense<1> : tensor<2xi64>} ins(%arg0, %arg1 : tensor<1x7x5x3xf32>, tensor<3x1x3x11xf32>) outs([[FILL]] : tensor<1x5x5x3x11xf32>) // CHECK: [[COLLAPSED:%.+]] = "tosa.reshape"([[DEPTH]]) {new_shape = [1, 5, 5, 33]} // CHECK: [[BIAS:%.+]] = linalg.generic {indexing_maps = [#[[$MAP0]], #[[$MAP1]], #[[$MAP1]]], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%arg2, [[COLLAPSED]] : tensor<33xf32>, tensor<1x5x5x33xf32>) outs([[OUT]] : tensor<1x5x5x33xf32>) { - // CHECK: ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): // no predecessors + // CHECK: ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): // CHECK: [[ADD:%.+]] = arith.addf %arg3, %arg4 : f32 // CHECK: linalg.yield [[ADD]] : f32 // CHECK: } -> tensor<1x5x5x33xf32> @@ -443,7 +443,7 @@ // CHECK: %[[DEPTH:.+]] = linalg.depthwise_conv_2d_nhwc_hwcm {dilations = dense<1> : tensor<2xi64>, strides = dense<1> : tensor<2xi64>} ins(%arg0, %arg1 : tensor, tensor<3x1x3x11xf32>) outs(%[[FILL]] : tensor) // CHECK: %[[COLLAPSED:.+]] = "tosa.reshape"(%[[DEPTH]]) {new_shape = [-1, 5, 5, 33]} // CHECK: %[[BIAS:.+]] = linalg.generic {indexing_maps = [#[[$MAP0]], #[[$MAP1]], #[[$MAP1]]], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%arg2, %[[COLLAPSED]] : tensor<33xf32>, tensor) outs(%[[OUT]] : tensor) { - // CHECK: ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): // no predecessors + // CHECK: ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): // CHECK: %[[ADD:.+]] = arith.addf %arg3, %arg4 : f32 // CHECK: linalg.yield %[[ADD]] : f32 // CHECK: } -> tensor @@ -465,7 +465,7 @@ // CHECK: [[DEPTH:%.+]] = linalg.depthwise_conv_2d_nhwc_hwcm {dilations = dense<1> : tensor<2xi64>, strides = dense<2> : tensor<2xi64>} ins(%arg0, %arg1 : tensor<1x11x9x3xf32>, tensor<3x1x3x11xf32>) outs([[FILL]] : tensor<1x5x5x3x11xf32>) // CHECK: [[COLLAPSED:%.+]] = "tosa.reshape"([[DEPTH]]) {new_shape = [1, 5, 5, 33]} // CHECK: [[BIAS:%.+]] = linalg.generic {indexing_maps = [#[[$MAP0]], #[[$MAP1]], #[[$MAP1]]], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%arg2, [[COLLAPSED]] : tensor<33xf32>, tensor<1x5x5x33xf32>) outs([[OUT]] : tensor<1x5x5x33xf32>) { - // CHECK: ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): // no predecessors + // CHECK: ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): // CHECK: [[ADD:%.+]] = arith.addf %arg3, %arg4 : f32 // CHECK: linalg.yield [[ADD]] : f32 // CHECK: } -> tensor<1x5x5x33xf32> @@ -493,7 +493,7 @@ // CHECK: [[DEPTH:%.+]] = linalg.depthwise_conv_2d_nhwc_hwcm_q {dilations = dense<1> : tensor<2xi64>, strides = dense<1> : tensor<2xi64>} ins([[PAD]], %arg1, [[C128]], [[C42]] : tensor<1x14x14x4xi8>, tensor<3x3x4x128xi8>, i32, i32) outs([[FILL]] : tensor<1x12x12x4x128xi32>) // CHECK: [[COLLAPSED:%.+]] = "tosa.reshape"([[DEPTH]]) {new_shape = [1, 12, 12, 512]} // CHECK: [[BIAS:%.+]] = linalg.generic {indexing_maps = [#[[$MAP0]], #[[$MAP1]], #[[$MAP1]]], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%arg2, [[COLLAPSED]] : tensor<512xi32>, tensor<1x12x12x512xi32>) outs([[OUT]] : tensor<1x12x12x512xi32>) { - // CHECK: ^bb0(%arg3: i32, %arg4: i32, %arg5: i32): // no predecessors + // CHECK: ^bb0(%arg3: i32, %arg4: i32, %arg5: i32): // CHECK: [[ADD:%.+]] = arith.addi %arg3, %arg4 : i32 // CHECK: linalg.yield [[ADD]] : i32 // CHECK: } -> tensor<1x12x12x512xi32> @@ -517,7 +517,7 @@ // CHECK: [[DEPTH:%.+]] = linalg.depthwise_conv_2d_nhwc_hwcm_q {dilations = dense<2> : tensor<2xi64>, strides = dense<1> : tensor<2xi64>} ins(%arg0, %arg1, [[C128]], [[C42]] : tensor<1x14x14x4xi8>, tensor<3x3x4x128xi8>, i32, i32) outs([[FILL]] : tensor<1x10x10x4x128xi32>) // CHECK: [[COLLAPSED:%.+]] = "tosa.reshape"([[DEPTH]]) {new_shape = [1, 10, 10, 512]} // CHECK: [[BIAS:%.+]] = linalg.generic {indexing_maps = [#[[$MAP0]], #[[$MAP1]], #[[$MAP1]]], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%arg2, [[COLLAPSED]] : tensor<512xi32>, tensor<1x10x10x512xi32>) outs([[OUT]] : tensor<1x10x10x512xi32>) { - // CHECK: ^bb0(%arg3: i32, %arg4: i32, %arg5: i32): // no predecessors + // CHECK: ^bb0(%arg3: i32, %arg4: i32, %arg5: i32): // CHECK: [[ADD:%.+]] = arith.addi %arg3, %arg4 : i32 // CHECK: linalg.yield [[ADD]] : i32 // CHECK: } -> tensor<1x10x10x512xi32> diff --git a/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg.mlir b/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg.mlir --- a/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg.mlir +++ b/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg.mlir @@ -1093,7 +1093,7 @@ // CHECK-DAG: [[INDEX4:%.+]] = arith.constant 4 : index // CHECK-DAG: [[CST:%.+]] = arith.constant 0.000000e+00 : f32 // CHECK: linalg.pad_tensor %arg0 low{{\[}}%{{.*}}, [[INDEX3]]] high{{\[}}[[INDEX2]], [[INDEX4]]] { - // CHECK: ^bb0(%arg1: index, %arg2: index): // no predecessors + // CHECK: ^bb0(%arg1: index, %arg2: index): // CHECK: linalg.yield [[CST]] // CHECK: } : tensor<1x2xf32> to tensor<4x9xf32> %1 = "tosa.pad"(%arg0, %0) : (tensor<1x2xf32>, tensor<2x2xi32>) -> (tensor<4x9xf32>) @@ -1129,7 +1129,7 @@ // CHECK-DAG: [[INDEX4:%.+]] = arith.constant 4 : index // CHECK-DAG: [[CST:%.+]] = arith.constant 4.200000e+01 : f32 // CHECK: linalg.pad_tensor %arg0 low{{\[}}%{{.*}}, [[INDEX3]]] high{{\[}}[[INDEX2]], [[INDEX4]]] { - // CHECK: ^bb0(%arg1: index, %arg2: index): // no predecessors + // CHECK: ^bb0(%arg1: index, %arg2: index): // CHECK: linalg.yield [[CST]] // CHECK: } : tensor<1x2xf32> to tensor<4x9xf32> %1 = arith.constant dense<42.0> : tensor diff --git a/mlir/test/Dialect/Affine/ops.mlir b/mlir/test/Dialect/Affine/ops.mlir --- a/mlir/test/Dialect/Affine/ops.mlir +++ b/mlir/test/Dialect/Affine/ops.mlir @@ -50,7 +50,7 @@ // CHECK-NEXT: } // // GENERIC: "affine.for"() ({ - // GENERIC-NEXT: ^bb0(%{{.*}}: index): // no predecessors + // GENERIC-NEXT: ^bb0(%{{.*}}: index): // GENERIC-NEXT: "affine.yield"() : () -> () // GENERIC-NEXT: }) {lower_bound = #map0, step = 1 : index, upper_bound = #map1} : () -> () affine.for %i = 0 to 10 { diff --git a/mlir/test/Dialect/Linalg/bufferize.mlir b/mlir/test/Dialect/Linalg/bufferize.mlir --- a/mlir/test/Dialect/Linalg/bufferize.mlir +++ b/mlir/test/Dialect/Linalg/bufferize.mlir @@ -278,7 +278,7 @@ %c0 = arith.constant 0 : index %cst = arith.constant 0.0 : f32 %out = linalg.pad_tensor %arg0 low[%c0, %c0, %arg1, %c0] high[%c0, %c0, %c0, %arg1] { - ^bb0(%gen_arg1: index, %gen_arg2: index, %gen_arg3: index, %gen_arg4: index): // no predecessors + ^bb0(%gen_arg1: index, %gen_arg2: index, %gen_arg3: index, %gen_arg4: index): linalg.yield %cst : f32 } : tensor<4x?x2x?xf32> to tensor<4x?x?x?xf32> return %out : tensor<4x?x?x?xf32> diff --git a/mlir/test/Dialect/Linalg/canonicalize.mlir b/mlir/test/Dialect/Linalg/canonicalize.mlir --- a/mlir/test/Dialect/Linalg/canonicalize.mlir +++ b/mlir/test/Dialect/Linalg/canonicalize.mlir @@ -297,7 +297,7 @@ linalg.yield %3 : i32 } -> tensor<7x7xi32> %3 = linalg.pad_tensor %arg2 low[%c0, %c0] high[%high, %high] { - ^bb0(%arg9: index, %arg10: index): // no predecessors + ^bb0(%arg9: index, %arg10: index): linalg.yield %cst : f32 } : tensor to tensor<2x4xf32> return @@ -354,7 +354,7 @@ %cst = arith.constant 0.000000e+00 : f32 %dynamic = tensor.cast %arg0 : tensor to tensor %padded = linalg.pad_tensor %dynamic low[0, 0, 1, 1] high[0, 0, 1, 1] { - ^bb0(%arg1: index, %arg2: index, %arg3: index, %arg4: index): // no predecessors + ^bb0(%arg1: index, %arg2: index, %arg3: index, %arg4: index): linalg.yield %cst: f32 } : tensor to tensor return %padded: tensor @@ -378,7 +378,7 @@ %cst = arith.constant 0.000000e+00 : f32 %dynamic = tensor.cast %arg0 : tensor to tensor %padded = linalg.pad_tensor %dynamic low[0, %padding, 1, 1] high[0, %padding, 1, 1] { - ^bb0(%arg1: index, %arg2: index, %arg3: index, %arg4: index): // no predecessors + ^bb0(%arg1: index, %arg2: index, %arg3: index, %arg4: index): linalg.yield %cst: f32 } : tensor to tensor return %padded: tensor @@ -395,7 +395,7 @@ %cst = arith.constant 0.000000e+00 : f32 %0 = tensor.cast %t : tensor<8x?xf32> to tensor %1 = linalg.pad_tensor %0 low[%c0, %c0] high[%c0, %s] { - ^bb0(%arg9: index, %arg10: index): // no predecessors + ^bb0(%arg9: index, %arg10: index): linalg.yield %cst : f32 } : tensor to tensor<8x32xf32> return %1 : tensor<8x32xf32> @@ -584,7 +584,7 @@ %cst = arith.constant 0.0 : f32 %0 = tensor.cast %arg0 : tensor<4x4xf32> to tensor %1 = linalg.pad_tensor %0 low[%c0, %c0] high[%c0, %c0] { - ^bb0(%arg1: index, %arg2: index): // no predecessors + ^bb0(%arg1: index, %arg2: index): linalg.yield %cst : f32 } : tensor to tensor<4x4xf32> return %1 : tensor<4x4xf32> @@ -603,7 +603,7 @@ %cst = arith.constant 0.0 : f32 %0 = tensor.cast %arg0 : tensor<4x?xf32> to tensor %1 = linalg.pad_tensor %0 low[0, 0] high[0, 1] { - ^bb0(%arg1: index, %arg2: index): // no predecessors + ^bb0(%arg1: index, %arg2: index): linalg.yield %cst : f32 } : tensor to tensor<4x4xf32> return %1 : tensor<4x4xf32> diff --git a/mlir/test/Dialect/Linalg/detensorize_0d.mlir b/mlir/test/Dialect/Linalg/detensorize_0d.mlir --- a/mlir/test/Dialect/Linalg/detensorize_0d.mlir +++ b/mlir/test/Dialect/Linalg/detensorize_0d.mlir @@ -7,7 +7,7 @@ %1 = linalg.generic {indexing_maps = [#map, #map, #map], iterator_types = []} ins(%arg1, %arg2 : tensor, tensor) outs(%0 : tensor) { - ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): // no predecessors + ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): %2 = arith.addf %arg3, %arg4 : f32 linalg.yield %2 : f32 } -> tensor @@ -26,7 +26,7 @@ %1 = linalg.generic {indexing_maps = [#map, #map, #map], iterator_types = []} ins(%arg1, %arg2 : tensor, tensor) outs(%0 : tensor) { - ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): // no predecessors + ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): %2 = arith.addf %arg3, %arg4 : f32 linalg.yield %2 : f32 } -> tensor @@ -35,7 +35,7 @@ %4 = linalg.generic {indexing_maps = [#map, #map, #map], iterator_types = []} ins(%arg1, %1 : tensor, tensor) outs(%3 : tensor) { - ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): // no predecessors + ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): %5 = arith.mulf %arg3, %arg4 : f32 linalg.yield %5 : f32 } -> tensor @@ -44,7 +44,7 @@ %7 = linalg.generic {indexing_maps = [#map, #map, #map], iterator_types = []} ins(%1, %4 : tensor, tensor) outs(%6 : tensor) { - ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): // no predecessors + ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): %5 = arith.divf %arg3, %arg4 : f32 linalg.yield %5 : f32 } -> tensor @@ -66,7 +66,7 @@ %1 = linalg.generic {indexing_maps = [#map, #map, #map], iterator_types = []} ins(%arg1, %arg2 : tensor, tensor) outs(%0 : tensor) { - ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): // no predecessors + ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): %2 = arith.addf %arg3, %arg4 : f32 %3 = arith.mulf %2, %arg4 : f32 linalg.yield %3 : f32 @@ -87,7 +87,7 @@ %1 = linalg.generic {indexing_maps = [#map, #map, #map], iterator_types = []} ins(%arg1, %arg2 : tensor, tensor) outs(%0 : tensor) { - ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): // no predecessors + ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): %2 = "foreign.do_something"(%arg3, %arg4) {} : (f32, f32) -> f32 linalg.yield %2 : f32 } -> tensor diff --git a/mlir/test/Dialect/Linalg/detensorize_br_operands.mlir b/mlir/test/Dialect/Linalg/detensorize_br_operands.mlir --- a/mlir/test/Dialect/Linalg/detensorize_br_operands.mlir +++ b/mlir/test/Dialect/Linalg/detensorize_br_operands.mlir @@ -11,7 +11,7 @@ {indexing_maps = [affine_map<() -> ()>, affine_map<() -> ()>], iterator_types = []} ins(%arg0_t : tensor) outs(%2 : tensor) { - ^bb0(%arg2: i1, %arg3: i8): // no predecessors + ^bb0(%arg2: i1, %arg3: i8): %10 = arith.extui %arg2 : i1 to i8 linalg.yield %10 : i8 } -> tensor @@ -24,7 +24,7 @@ {indexing_maps = [affine_map<() -> ()>, affine_map<() -> ()>, affine_map<() -> ()>], iterator_types = []} ins(%arg1_t, %cst : tensor, tensor) outs(%6 : tensor) { - ^bb0(%arg2: i32, %arg3: i32, %arg4: i32): // no predecessors + ^bb0(%arg2: i32, %arg3: i32, %arg4: i32): %10 = arith.addi %arg2, %arg3 : i32 linalg.yield %10 : i32 } -> tensor diff --git a/mlir/test/Dialect/Linalg/detensorize_if.mlir b/mlir/test/Dialect/Linalg/detensorize_if.mlir --- a/mlir/test/Dialect/Linalg/detensorize_if.mlir +++ b/mlir/test/Dialect/Linalg/detensorize_if.mlir @@ -19,7 +19,7 @@ %4 = linalg.generic #attrs ins(%2, %1 : tensor, tensor) outs(%3 : tensor) { - ^bb0(%arg0: i32, %arg1: i32, %arg2: i1): // no predecessors + ^bb0(%arg0: i32, %arg1: i32, %arg2: i1): %8 = arith.cmpi slt, %arg0, %arg1 : i32 linalg.yield %8 : i1 } -> tensor @@ -31,7 +31,7 @@ %8 = linalg.generic #attrs ins(%6, %6 : tensor, tensor) outs(%7 : tensor) { - ^bb0(%arg0: i32, %arg1: i32, %arg2: i32): // no predecessors + ^bb0(%arg0: i32, %arg1: i32, %arg2: i32): %9 = arith.addi %arg0, %arg1 : i32 linalg.yield %9 : i32 } -> tensor @@ -80,7 +80,7 @@ %4 = linalg.generic #attrs ins(%2, %1 : tensor, tensor) outs(%3 : tensor) { - ^bb0(%arg0: i32, %arg1: i32, %arg2: i1): // no predecessors + ^bb0(%arg0: i32, %arg1: i32, %arg2: i1): %8 = arith.cmpi slt, %arg0, %arg1 : i32 linalg.yield %8 : i1 } -> tensor @@ -92,7 +92,7 @@ %8 = linalg.generic #attrs ins(%6, %6 : tensor, tensor) outs(%7 : tensor) { - ^bb0(%arg0: i32, %arg1: i32, %arg2: i32): // no predecessors + ^bb0(%arg0: i32, %arg1: i32, %arg2: i32): %9 = arith.addi %arg0, %arg1 : i32 linalg.yield %9 : i32 } -> tensor @@ -143,7 +143,7 @@ %4 = linalg.generic #attrs ins(%2, %1 : tensor, tensor) outs(%3 : tensor) { - ^bb0(%arg0: i32, %arg1: i32, %arg2: i1): // no predecessors + ^bb0(%arg0: i32, %arg1: i32, %arg2: i1): %8 = arith.cmpi slt, %arg0, %arg1 : i32 linalg.yield %8 : i1 } -> tensor @@ -160,7 +160,7 @@ %8 = linalg.generic #attrs ins(%6, %12 : tensor, tensor) outs(%7 : tensor) { - ^bb0(%arg0: i32, %arg1: i32, %arg2: i32): // no predecessors + ^bb0(%arg0: i32, %arg1: i32, %arg2: i32): %9 = arith.addi %arg0, %arg1 : i32 linalg.yield %9 : i32 } -> tensor diff --git a/mlir/test/Dialect/Linalg/detensorize_while.mlir b/mlir/test/Dialect/Linalg/detensorize_while.mlir --- a/mlir/test/Dialect/Linalg/detensorize_while.mlir +++ b/mlir/test/Dialect/Linalg/detensorize_while.mlir @@ -16,7 +16,7 @@ %2 = linalg.generic #attrs ins(%0, %farg1 : tensor, tensor) outs(%1 : tensor) { - ^bb0(%arg0: i32, %arg1: i32, %arg2: i1): // no predecessors + ^bb0(%arg0: i32, %arg1: i32, %arg2: i1): %8 = arith.cmpi slt, %arg0, %arg1 : i32 linalg.yield %8 : i1 } -> tensor @@ -28,7 +28,7 @@ %6 = linalg.generic #attrs ins(%4, %4 : tensor, tensor) outs(%5 : tensor) { - ^bb0(%arg0: i32, %arg1: i32, %arg2: i32): // no predecessors + ^bb0(%arg0: i32, %arg1: i32, %arg2: i32): %8 = arith.addi %arg0, %arg1 : i32 linalg.yield %8 : i32 } -> tensor diff --git a/mlir/test/Dialect/Linalg/detensorize_while_impure_cf.mlir b/mlir/test/Dialect/Linalg/detensorize_while_impure_cf.mlir --- a/mlir/test/Dialect/Linalg/detensorize_while_impure_cf.mlir +++ b/mlir/test/Dialect/Linalg/detensorize_while_impure_cf.mlir @@ -38,7 +38,7 @@ %4 = linalg.generic #attrs ins(%2, %farg1 : tensor, tensor) outs(%3 : tensor) { - ^bb0(%arg0: i32, %arg1: i32, %arg2: i1): // no predecessors + ^bb0(%arg0: i32, %arg1: i32, %arg2: i1): %8 = arith.cmpi slt, %arg0, %arg1 : i32 linalg.yield %8 : i1 } -> tensor @@ -68,7 +68,7 @@ // DET-ALL: ^[[bb1]](%{{.*}}: tensor<10xi32>) // DET-ALL: linalg.init_tensor [] : tensor // DET-ALL: linalg.generic {{{.*}}} ins(%{{.*}} : tensor<10xi32>) outs(%{{.*}} : tensor) { -// DET-ALL: ^bb0(%{{.*}}: i32, %{{.*}}: i32): // no predecessors +// DET-ALL: ^bb0(%{{.*}}: i32, %{{.*}}: i32): // DET-ALL: %{{.*}} = arith.addi %{{.*}}, %{{.*}} // DET-ALL: linalg.yield %{{.*}} : i32 // DET-ALL: } -> tensor diff --git a/mlir/test/Dialect/Linalg/detensorize_while_pure_cf.mlir b/mlir/test/Dialect/Linalg/detensorize_while_pure_cf.mlir --- a/mlir/test/Dialect/Linalg/detensorize_while_pure_cf.mlir +++ b/mlir/test/Dialect/Linalg/detensorize_while_pure_cf.mlir @@ -21,7 +21,7 @@ %4 = linalg.generic #attrs ins(%2, %reshaped1 : tensor, tensor) outs(%3 : tensor) { - ^bb0(%arg0: i32, %arg1: i32, %arg2: i1): // no predecessors + ^bb0(%arg0: i32, %arg1: i32, %arg2: i1): %8 = arith.cmpi slt, %arg0, %arg1 : i32 linalg.yield %8 : i1 } -> tensor @@ -33,7 +33,7 @@ %8 = linalg.generic #attrs ins(%6, %6 : tensor, tensor) outs(%7 : tensor) { - ^bb0(%arg0: i32, %arg1: i32, %arg2: i32): // no predecessors + ^bb0(%arg0: i32, %arg1: i32, %arg2: i32): %9 = arith.addi %arg0, %arg1 : i32 linalg.yield %9 : i32 } -> tensor diff --git a/mlir/test/Dialect/Linalg/drop-unit-extent-dims.mlir b/mlir/test/Dialect/Linalg/drop-unit-extent-dims.mlir --- a/mlir/test/Dialect/Linalg/drop-unit-extent-dims.mlir +++ b/mlir/test/Dialect/Linalg/drop-unit-extent-dims.mlir @@ -156,7 +156,7 @@ %0 = linalg.generic #trait ins(%arg0 : tensor<1x5xf32>) outs(%shape : tensor<5xf32>) { - ^bb0(%arg2: f32, %arg3: f32): // no predecessors + ^bb0(%arg2: f32, %arg3: f32): linalg.yield %arg2 : f32 } -> tensor<5xf32> return %0 : tensor<5xf32> @@ -250,7 +250,7 @@ %2 = linalg.generic {i64, indexing_maps = [#map1, #map0], iterator_types = ["parallel", "parallel", "parallel"]} ins(%arg0 : tensor<5xf32>) outs(%1 : tensor<1x2x5xf32>) { - ^bb0(%arg1: f32, %arg2: f32): // no predecessors + ^bb0(%arg1: f32, %arg2: f32): linalg.yield %arg1 : f32 } -> tensor<1x2x5xf32> %3 = tensor.collapse_shape %2 [[0, 1], [2]] @@ -338,7 +338,7 @@ iterator_types = ["parallel", "parallel", "reduction", "reduction"]} ins(%arg0 : tensor<1x?x1x?xf32>) outs(%2 : tensor<1x?xf32>) { - ^bb0(%arg1: f32, %arg2: f32): // no predecessors + ^bb0(%arg1: f32, %arg2: f32): %4 = arith.addf %arg1, %arg2 : f32 linalg.yield %4 : f32 } -> tensor<1x?xf32> @@ -372,7 +372,7 @@ iterator_types = ["parallel", "parallel", "reduction", "reduction"]} ins(%arg0 : tensor<1x?x1x1xf32>) outs(%2 : tensor<1x1xf32>) { - ^bb0(%arg1: f32, %arg2: f32): // no predecessors + ^bb0(%arg1: f32, %arg2: f32): %4 = arith.addf %arg1, %arg2 : f32 linalg.yield %4 : f32 } -> tensor<1x1xf32> @@ -406,7 +406,7 @@ iterator_types = ["parallel", "parallel", "reduction", "reduction"]} ins(%arg0 : tensor) outs(%2 : tensor) { - ^bb0(%arg1: f32, %arg2: f32): // no predecessors + ^bb0(%arg1: f32, %arg2: f32): %4 = arith.addf %arg1, %arg2 : f32 linalg.yield %4 : f32 } -> tensor @@ -608,7 +608,7 @@ linalg.generic #trait ins(%arg0 : memref<1x5xf32>) outs(%shape : memref<5xf32>) { - ^bb0(%arg2: f32, %arg3: f32): // no predecessors + ^bb0(%arg2: f32, %arg3: f32): linalg.yield %arg2 : f32 } return %shape : memref<5xf32> @@ -702,7 +702,7 @@ linalg.generic {i64, indexing_maps = [#map1, #map0], iterator_types = ["parallel", "parallel", "parallel"]} ins(%arg0 : memref<5xf32>) outs(%1 : memref<1x2x5xf32>) { - ^bb0(%arg1: f32, %arg2: f32): // no predecessors + ^bb0(%arg1: f32, %arg2: f32): linalg.yield %arg1 : f32 } %3 = memref.collapse_shape %1 [[0, 1], [2]] @@ -792,7 +792,7 @@ // CHECK-SAME: iterator_types = ["parallel", "parallel", "parallel"]} // CHECK-SAME: ins(%[[ARG0]], %[[ARG1]] : memref, f32) // CHECK-SAME: outs(%[[OUT]] : memref) { -// CHECK: ^bb0(%{{.*}}: f32, %[[ARG:.*]]: f32, %{{.*}}: f32): // no predecessors +// CHECK: ^bb0(%{{.*}}: f32, %[[ARG:.*]]: f32, %{{.*}}: f32): // CHECK: linalg.yield %[[ARG]] : f32 // CHECK: } // CHECK: return %[[ARG2]] : memref diff --git a/mlir/test/Dialect/Linalg/fold-unit-trip-loops.mlir b/mlir/test/Dialect/Linalg/fold-unit-trip-loops.mlir --- a/mlir/test/Dialect/Linalg/fold-unit-trip-loops.mlir +++ b/mlir/test/Dialect/Linalg/fold-unit-trip-loops.mlir @@ -97,7 +97,7 @@ %0 = linalg.generic #trait ins(%arg0 : tensor<1x5xf32>) outs(%shape : tensor<5xf32>) { - ^bb0(%arg2: f32, %arg3: f32): // no predecessors + ^bb0(%arg2: f32, %arg3: f32): linalg.yield %arg2 : f32 } -> tensor<5xf32> return %0 : tensor<5xf32> diff --git a/mlir/test/Dialect/Linalg/fusion-elementwise-ops.mlir b/mlir/test/Dialect/Linalg/fusion-elementwise-ops.mlir --- a/mlir/test/Dialect/Linalg/fusion-elementwise-ops.mlir +++ b/mlir/test/Dialect/Linalg/fusion-elementwise-ops.mlir @@ -14,7 +14,7 @@ %3 = linalg.generic {indexing_maps = [#map0, #map0, #map0], iterator_types = ["parallel", "parallel"]} ins(%arg0, %arg1 : tensor, tensor) outs(%2 : tensor) { - ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): // no predecessors + ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): %4 = arith.addf %arg3, %arg4 : f32 linalg.yield %4 : f32 } -> tensor @@ -27,7 +27,7 @@ // CHECK-SAME: [[ARG0:%[a-zA-Z0-9_]*]] // CHECK-SAME: [[ARG1:%[a-zA-Z0-9_]*]] // CHECK-SAME: [[ARG2:%[a-zA-Z0-9_]*]] - ^bb0(%arg5: f32, %arg6: f32, %arg7: f32): // no predecessors + ^bb0(%arg5: f32, %arg6: f32, %arg7: f32): // CHECK: [[T1:%[a-zA-Z0-9_]*]] = arith.addf [[ARG0]], [[ARG1]] // CHECK-NOT: linalg.yield // CHECK: arith.mulf [[T1]], [[ARG2]] @@ -56,7 +56,7 @@ %3 = linalg.generic {indexing_maps = [#map0, #map1, #map0], iterator_types = ["parallel", "parallel"]} ins(%arg0, %arg1 : tensor, f32) outs(%2 : tensor) { - ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): // no predecessors + ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): %4 = arith.addf %arg3, %arg4 : f32 linalg.yield %4 : f32 } -> tensor @@ -69,7 +69,7 @@ // CHECK-SAME: [[ARG3:%[a-zA-Z0-9_]*]] // CHECK-SAME: [[ARG4:%[a-zA-Z0-9_]*]] // CHECK-SAME: [[ARG5:%[a-zA-Z0-9_]*]] - ^bb0(%arg5: f32, %arg6: f32, %arg7: f32): // no predecessors + ^bb0(%arg5: f32, %arg6: f32, %arg7: f32): // CHECK: [[T1:%[a-zA-Z0-9_]*]] = arith.addf [[ARG3]], [[ARG4]] // CHECK-NOT: linalg.yield // CHECK: arith.mulf [[T1]], [[ARG5]] @@ -98,7 +98,7 @@ %3 = linalg.generic {indexing_maps = [#map0, #map1, #map0], iterator_types = ["parallel", "parallel"]} ins(%arg0, %arg1 : tensor, tensor) outs(%2 : tensor) { - ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): // no predecessors + ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): %4 = arith.addf %arg3, %arg4 : f32 linalg.yield %4 : f32 } -> tensor @@ -107,7 +107,7 @@ %4 = linalg.generic {indexing_maps = [#map0, #map0, #map0], iterator_types = ["parallel", "parallel"]} ins(%3, %arg2 : tensor, tensor) outs(%2 : tensor) { - ^bb0(%arg5: f32, %arg6: f32, %arg7: f32): // no predecessors + ^bb0(%arg5: f32, %arg6: f32, %arg7: f32): %5 = arith.mulf %arg5, %arg6 : f32 linalg.yield %5 : f32 } -> tensor @@ -132,7 +132,7 @@ %3 = linalg.generic {indexing_maps = [#map0, #map1, #map0], iterator_types = ["parallel", "parallel"]} ins(%arg0, %arg1 : tensor, tensor) outs(%2 : tensor) { - ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): // no predecessors + ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): %4 = arith.addf %arg3, %arg4 : f32 linalg.yield %4 : f32 } -> tensor @@ -141,7 +141,7 @@ %4 = linalg.generic {indexing_maps = [#map1, #map0, #map0], iterator_types = ["parallel", "parallel"]} ins(%3, %arg2 : tensor, tensor) outs(%2 : tensor){ - ^bb0(%arg5: f32, %arg6: f32, %arg7: f32): // no predecessors + ^bb0(%arg5: f32, %arg6: f32, %arg7: f32): %5 = arith.mulf %arg5, %arg6 : f32 linalg.yield %5 : f32 } -> tensor @@ -166,7 +166,7 @@ %2 = linalg.generic {indexing_maps = [#map2, #map2, #map2], iterator_types = ["parallel"]} ins(%arg0, %arg1 : tensor, tensor) outs(%1 : tensor) { - ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): // no predecessors + ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): %3 = arith.addf %arg3, %arg4 : f32 linalg.yield %3 : f32 } -> tensor @@ -177,7 +177,7 @@ %5 = linalg.generic {indexing_maps = [#map1, #map0, #map0], iterator_types = ["parallel", "parallel"]} ins(%2, %arg2 : tensor, tensor) outs(%4 : tensor){ - ^bb0(%arg5: f32, %arg6: f32, %arg7: f32): // no predecessors + ^bb0(%arg5: f32, %arg6: f32, %arg7: f32): %6 = arith.mulf %arg5, %arg6 : f32 linalg.yield %6 : f32 } -> tensor @@ -196,7 +196,7 @@ %1 = linalg.generic {indexing_maps = [#map0, #map0, #map0], iterator_types = []} ins(%arg0, %arg1 : tensor, tensor) outs(%0 : tensor) { - ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): // no predecessors + ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): %2 = arith.addf %arg3, %arg4 : f32 linalg.yield %2 : f32 } -> tensor @@ -206,7 +206,7 @@ %2 = linalg.generic {indexing_maps = [#map0, #map0, #map0], iterator_types = []} ins(%1, %arg2 : tensor, tensor) outs(%0 : tensor) { - ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): // no predecessors + ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): %3 = arith.mulf %arg3, %arg4 : f32 linalg.yield %3 : f32 } -> tensor @@ -292,7 +292,7 @@ iterator_types = ["parallel", "parallel"] } ins(%arg0, %arg1 : tensor, tensor) outs(%2 : tensor) { - ^bb0(%arg2: i32, %arg3: i32, %arg4: i32): // no predecessors + ^bb0(%arg2: i32, %arg3: i32, %arg4: i32): %10 = arith.addi %arg2, %arg3 : i32 linalg.yield %10 : i32 } -> tensor @@ -301,7 +301,7 @@ iterator_types = ["parallel", "parallel"] } ins(%3 : tensor) outs(%2 : tensor) { - ^bb0(%arg2: i32, %arg3: i32): // no predecessors + ^bb0(%arg2: i32, %arg3: i32): %idx0 = linalg.index 0 : index %idx1 = linalg.index 1 : index %5 = arith.index_cast %idx0 : index to i32 @@ -343,7 +343,7 @@ iterator_types = ["parallel", "parallel"] } ins(%arg0 : tensor) outs(%2 : tensor) { - ^bb0(%arg4: i32, %arg5: i32): // no predecessors + ^bb0(%arg4: i32, %arg5: i32): %idx0 = linalg.index 0 : index %idx1 = linalg.index 1 : index %4 = arith.index_cast %idx0 : index to i32 @@ -357,7 +357,7 @@ iterator_types = ["parallel", "parallel"] } ins(%3, %arg0 : tensor, tensor) outs(%2 : tensor) { - ^bb0(%arg2: i32, %arg3: i32, %arg4: i32): // no predecessors + ^bb0(%arg2: i32, %arg3: i32, %arg4: i32): %10 = arith.addi %arg2, %arg3 : i32 linalg.yield %10 : i32 } -> tensor @@ -397,7 +397,7 @@ iterator_types = ["parallel", "parallel"] } ins(%arg0 : tensor) outs(%2 : tensor) { - ^bb0(%arg2: i32, %arg3: i32): // no predecessors + ^bb0(%arg2: i32, %arg3: i32): %idx0 = linalg.index 0 : index %idx1 = linalg.index 1 : index %4 = arith.index_cast %idx0 : index to i32 @@ -411,7 +411,7 @@ iterator_types = ["parallel", "parallel"] } ins(%3 : tensor) outs(%2 : tensor) { - ^bb0(%arg2: i32, %arg3: i32): // no predecessors + ^bb0(%arg2: i32, %arg3: i32): %idx0 = linalg.index 0 : index %idx1 = linalg.index 1 : index %5 = arith.index_cast %idx0 : index to i32 @@ -504,7 +504,7 @@ {indexing_maps = [affine_map<() -> ()>, affine_map<() -> ()>], iterator_types = []} ins(%arg1 : tensor) outs(%0 : tensor) { - ^bb0(%arg2: i32, %arg3: f32): // no predecessors + ^bb0(%arg2: i32, %arg3: f32): %3 = arith.index_cast %arg2 : i32 to index %4 = tensor.extract %arg0[%3, %c0, %c0] : tensor<5x1x1xf32> linalg.yield %4 : f32 @@ -515,7 +515,7 @@ affine_map<(d0) -> (d0)>], iterator_types = ["parallel"]} ins(%1, %cst : tensor, tensor<10xf32>) outs(%2 : tensor<10xf32>) { - ^bb0(%arg2: f32, %arg3: f32, %arg4: f32): // no predecessors + ^bb0(%arg2: f32, %arg3: f32, %arg4: f32): %4 = arith.mulf %arg2, %arg3 : f32 linalg.yield %4 : f32 } -> tensor<10xf32> @@ -580,7 +580,7 @@ iterator_types = ["parallel", "parallel"]} ins(%arg0, %arg1 : tensor<1x10xf32>, tensor<1x10xf32>) outs(%init : tensor<1x10xf32>) { - ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): // no predecessors + ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): %2 = arith.addf %arg3, %arg4 : f32 linalg.yield %2 : f32 } -> tensor<1x10xf32> @@ -589,7 +589,7 @@ iterator_types = ["reduction"]} ins(%0 : tensor<1x10xf32>) outs(%arg2 : tensor<1xf32>) { - ^bb0(%arg3: f32, %arg4: f32): // no predecessors + ^bb0(%arg3: f32, %arg4: f32): %2 = arith.addf %arg3, %arg4 : f32 linalg.yield %2 : f32 } -> tensor<1xf32> @@ -626,7 +626,7 @@ iterator_types = ["parallel", "parallel"] } outs(%init0 : tensor) { - ^bb0(%a: f32): // no predecessors + ^bb0(%a: f32): linalg.yield %cp5 : f32 } -> tensor %d0 = tensor.dim %0, %c0 : tensor @@ -639,7 +639,7 @@ } ins(%0, %1 : tensor, tensor) outs(%init1 : tensor) { - ^bb0(%a: f32, %b: f32, %c: f32): // no predecessors + ^bb0(%a: f32, %b: f32, %c: f32): %m = arith.mulf %a, %b : f32 linalg.yield %m : f32 } -> tensor @@ -930,7 +930,7 @@ indexing_maps = [#map0, #map1], iterator_types = ["parallel", "parallel"] } ins(%arg0 : tensor) outs(%4 : tensor) { - ^bb0(%arg2: f32, %arg3: f32): // no predecessors + ^bb0(%arg2: f32, %arg3: f32): linalg.yield %arg2 : f32 } -> tensor %6 = linalg.init_tensor [%arg1] : tensor @@ -939,7 +939,7 @@ indexing_maps = [#map2, #map3], iterator_types = ["parallel", "reduction"] } ins(%5 : tensor) outs(%7 : tensor) { - ^bb0(%arg2: f32, %arg3: f32): // no predecessors + ^bb0(%arg2: f32, %arg3: f32): %9 = arith.maxf %arg2, %arg3 : f32 linalg.yield %9 : f32 } -> tensor diff --git a/mlir/test/Dialect/Linalg/fusion-indexed.mlir b/mlir/test/Dialect/Linalg/fusion-indexed.mlir --- a/mlir/test/Dialect/Linalg/fusion-indexed.mlir +++ b/mlir/test/Dialect/Linalg/fusion-indexed.mlir @@ -13,7 +13,7 @@ linalg.generic #pointwise_2d_trait ins(%A, %B: memref, memref) outs(%C : memref) { - ^bb0(%e: f32, %arg5: f32, %arg6: f32): // no predecessors + ^bb0(%e: f32, %arg5: f32, %arg6: f32): %2 = arith.addf %e, %arg5 : f32 linalg.yield %2 : f32 } @@ -75,7 +75,7 @@ indexing_maps = [affine_map<(i, j) -> (j, i)>], iterator_types = ["parallel", "parallel"]} outs(%A : memref) { - ^bb0(%a: index): // no predecessors + ^bb0(%a: index): %idx0 = linalg.index 0 : index %idx1 = linalg.index 1 : index %0 = arith.addi %idx0, %idx1 : index @@ -124,7 +124,7 @@ indexing_maps = [affine_map<(i, j) -> (i, j)>], iterator_types = ["parallel", "parallel"]} outs(%A : memref) { - ^bb0(%a: index): // no predecessors + ^bb0(%a: index): %idx0 = linalg.index 0 : index %idx1 = linalg.index 1 : index %0 = arith.addi %idx0, %idx1 : index diff --git a/mlir/test/Dialect/Linalg/fusion-push-reshape.mlir b/mlir/test/Dialect/Linalg/fusion-push-reshape.mlir --- a/mlir/test/Dialect/Linalg/fusion-push-reshape.mlir +++ b/mlir/test/Dialect/Linalg/fusion-push-reshape.mlir @@ -20,7 +20,7 @@ iterator_types = ["parallel", "parallel", "parallel"]} ins(%0, %B : tensor, tensor<16xf32>) outs(%init : tensor) { - ^bb0(%arg1: f32, %arg2: f32, %arg3: f32): // no predecessors + ^bb0(%arg1: f32, %arg2: f32, %arg3: f32): %s = arith.subf %arg1, %arg2 : f32 linalg.yield %s : f32 } -> tensor @@ -56,7 +56,7 @@ iterator_types = ["parallel", "parallel", "parallel"]} ins(%0, %1, %C : tensor<112x112x16xf32>, tensor<112x112x16xf32>, tensor<16xf32>) outs(%2 : tensor<112x112x16xf32>) { - ^bb0(%arg1: f32, %arg2: f32, %arg3: f32, %arg4: f32): // no predecessors + ^bb0(%arg1: f32, %arg2: f32, %arg3: f32, %arg4: f32): %s = arith.subf %arg1, %arg2 : f32 %m = arith.mulf %s, %arg3 : f32 linalg.yield %m : f32 @@ -82,7 +82,7 @@ iterator_types = ["parallel", "parallel", "parallel"]} ins(%20, %B : tensor<112x112x16xf32>, tensor<112xf32>) outs(%21 : tensor<112x112x16xf32>) { - ^bb0(%arg1: f32, %arg2: f32, %arg3: f32): // no predecessors + ^bb0(%arg1: f32, %arg2: f32, %arg3: f32): %s = arith.subf %arg1, %arg2 : f32 linalg.yield %s : f32 } -> tensor<112x112x16xf32> @@ -107,7 +107,7 @@ iterator_types = ["parallel", "parallel", "parallel"]} ins(%25, %arg1, %arg2 : tensor<2x3x5xi32>, tensor<5xf32>, tensor<5xf32>) outs(%26 : tensor<2x3x5xf32>) { - ^bb0(%arg6: i32, %arg7: f32, %arg8: f32, %arg9: f32): // no predecessors + ^bb0(%arg6: i32, %arg7: f32, %arg8: f32, %arg9: f32): %29 = arith.sitofp %arg6 : i32 to f32 %30 = arith.addf %arg7, %cst_8 : f32 %31 = arith.divf %cst_7, %30 : f32 diff --git a/mlir/test/Dialect/Linalg/fusion.mlir b/mlir/test/Dialect/Linalg/fusion.mlir --- a/mlir/test/Dialect/Linalg/fusion.mlir +++ b/mlir/test/Dialect/Linalg/fusion.mlir @@ -504,7 +504,7 @@ ins(%A, %A: memref, memref) outs(%B : memref) { - ^bb0(%E: f32, %arg5: f32, %arg6: f32): // no predecessors + ^bb0(%E: f32, %arg5: f32, %arg6: f32): %2 = arith.addf %E, %arg5 : f32 linalg.yield %2 : f32 } @@ -525,7 +525,7 @@ ins(%4, %5: memref, memref) outs(%6 : memref) { - ^bb0(%arg6: f32, %arg7: f32, %arg8: f32): // no predecessors + ^bb0(%arg6: f32, %arg7: f32, %arg8: f32): %7 = arith.mulf %arg6, %arg7 : f32 linalg.yield %7 : f32 } @@ -562,7 +562,7 @@ linalg.generic #pointwise_2d_trait ins(%A, %A : memref, memref) outs(%B : memref) { - ^bb0(%e: f32, %arg5: f32, %arg6: f32): // no predecessors + ^bb0(%e: f32, %arg5: f32, %arg6: f32): %2 = arith.addf %e, %arg5 : f32 linalg.yield %2 : f32 } @@ -583,7 +583,7 @@ ins(%4, %5: memref, memref) outs(%6 : memref) { - ^bb0(%arg6: f32, %arg7: f32, %arg8: f32): // no predecessors + ^bb0(%arg6: f32, %arg7: f32, %arg8: f32): %7 = arith.mulf %arg6, %arg7 : f32 linalg.yield %7 : f32 } @@ -618,7 +618,7 @@ iterator_types = ["parallel", "parallel"]} ins(%arg1 : memref<100xf32>) outs(%0 : memref<100x10xf32>) { - ^bb0(%arg3: f32, %arg4: f32): // no predecessors + ^bb0(%arg3: f32, %arg4: f32): linalg.yield %arg3 : f32 } %1 = memref.alloc() {temp = true} : memref<100x10xf32> @@ -627,7 +627,7 @@ iterator_types = ["parallel", "parallel"]} ins(%arg0, %0: memref<100x10xf32>, memref<100x10xf32>) outs(%1 : memref<100x10xf32>) { - ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): // no predecessors + ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): %2 = arith.subf %arg3, %arg4 : f32 linalg.yield %2 : f32 } @@ -647,7 +647,7 @@ iterator_types = ["parallel", "parallel"]} ins(%6 : memref) outs(%7 : memref) { - ^bb0(%arg3: f32, %arg4: f32): // no predecessors + ^bb0(%arg3: f32, %arg4: f32): %8 = math.exp %arg3 : f32 linalg.yield %8 : f32 } diff --git a/mlir/test/Dialect/Linalg/generalize-pad-tensor.mlir b/mlir/test/Dialect/Linalg/generalize-pad-tensor.mlir --- a/mlir/test/Dialect/Linalg/generalize-pad-tensor.mlir +++ b/mlir/test/Dialect/Linalg/generalize-pad-tensor.mlir @@ -10,7 +10,7 @@ func @generalize_pad_tensor_static_shape(%arg0: tensor<1x28x28x1xf32>) -> tensor<1x32x32x1xf32> { %cst = arith.constant 0.000000e+00 : f32 %0 = linalg.pad_tensor %arg0 low[0, 2, 2, 0] high[0, 2, 2, 0] { - ^bb0(%arg1: index, %arg2: index, %arg3: index, %arg4: index): // no predecessors + ^bb0(%arg1: index, %arg2: index, %arg3: index, %arg4: index): linalg.yield %cst : f32 } : tensor<1x28x28x1xf32> to tensor<1x32x32x1xf32> return %0 : tensor<1x32x32x1xf32> @@ -39,7 +39,7 @@ %c0 = arith.constant 0 : index %cst = arith.constant 0.0 : f32 %out = linalg.pad_tensor %arg0 low[%c0, %c0, %arg1, %c0] high[%c0, %c0, %c0, %arg1] { - ^bb0(%gen_arg1: index, %gen_arg2: index, %gen_arg3: index, %gen_arg4: index): // no predecessors + ^bb0(%gen_arg1: index, %gen_arg2: index, %gen_arg3: index, %gen_arg4: index): linalg.yield %cst : f32 } : tensor<4x?x2x?xf32> to tensor<4x?x?x?xf32> return %out : tensor<4x?x?x?xf32> diff --git a/mlir/test/Dialect/Linalg/hoist-padding.mlir b/mlir/test/Dialect/Linalg/hoist-padding.mlir --- a/mlir/test/Dialect/Linalg/hoist-padding.mlir +++ b/mlir/test/Dialect/Linalg/hoist-padding.mlir @@ -30,7 +30,7 @@ // MATVEC-DAG: %[[T4:.*]] = tensor.extract_slice %[[T0]][%[[IDX0]] %2 = tensor.extract_slice %arg1[%arg3] [4] [1] : tensor<12xf32> to tensor<4xf32> %3 = linalg.pad_tensor %2 nofold low[%c0] high[%c0] { - ^bb0(%arg5: index): // no predecessors + ^bb0(%arg5: index): linalg.yield %cst : f32 } : tensor<4xf32> to tensor<4xf32> @@ -81,11 +81,11 @@ %3 = tensor.extract_slice %arg1[%arg3] [%1] [1] : tensor<12xf32> to tensor %4 = affine.apply #map1(%1) %5 = linalg.pad_tensor %2 low[%c0, %c0] high[%c0, %4] { - ^bb0(%arg5: index, %arg6: index): // no predecessors + ^bb0(%arg5: index, %arg6: index): linalg.yield %cst : f32 } : tensor<24x?xf32> to tensor<24x5xf32> %6 = linalg.pad_tensor %3 low[%c0] high[%4] { - ^bb0(%arg5: index): // no predecessors + ^bb0(%arg5: index): linalg.yield %cst : f32 } : tensor to tensor<5xf32> @@ -141,11 +141,11 @@ %4 = tensor.extract_slice %arg1[%arg3] [%2] [1] : tensor to tensor %5 = affine.apply #map1(%2) %6 = linalg.pad_tensor %3 low[%c0, %c0] high[%c0, %5] { - ^bb0(%arg5: index, %arg6: index): // no predecessors + ^bb0(%arg5: index, %arg6: index): linalg.yield %cst : f32 } : tensor<24x?xf32> to tensor<24x4xf32> %7 = linalg.pad_tensor %4 nofold low[%c0] high[%5] { - ^bb0(%arg5: index): // no predecessors + ^bb0(%arg5: index): linalg.yield %cst : f32 } : tensor to tensor<4xf32> @@ -177,7 +177,7 @@ // MATVEC: %[[T1:.*]] = linalg.pad_tensor %[[T0]] %2 = tensor.extract_slice %arg1[%arg3] [4] [1] : tensor<12xf32> to tensor<4xf32> %3 = linalg.pad_tensor %2 nofold low[%c0] high[%c0] { - ^bb0(%arg5: index): // no predecessors + ^bb0(%arg5: index): %5 = arith.index_cast %arg3 : index to i32 %6 = arith.sitofp %5 : i32 to f32 linalg.yield %6 : f32 @@ -214,7 +214,7 @@ %2 = tensor.extract_slice %arg1[%arg3] [4] [1] : tensor<12xf32> to tensor<4xf32> %3 = tensor.extract %arg1[%arg3] : tensor<12xf32> %4 = linalg.pad_tensor %2 nofold low[%c0] high[%c0] { - ^bb0(%arg5: index): // no predecessors + ^bb0(%arg5: index): linalg.yield %3 : f32 } : tensor<4xf32> to tensor<4xf32> @@ -251,7 +251,7 @@ %2 = tensor.extract_slice %arg1[%arg4] [4] [1] : tensor<12xf32> to tensor<4xf32> %3 = arith.index_cast %arg3 : i32 to index %4 = linalg.pad_tensor %2 nofold low[%3] high[%3] { - ^bb0(%arg6: index): // no predecessors + ^bb0(%arg6: index): linalg.yield %cst : f32 } : tensor<4xf32> to tensor<4xf32> @@ -288,7 +288,7 @@ %2 = tensor.extract_slice %arg1[%arg4] [4] [1] : tensor<12xf32> to tensor<4xf32> %3 = memref.load %arg3[%c0] : memref %4 = linalg.pad_tensor %2 nofold low[%3] high[%3] { - ^bb0(%arg6: index): // no predecessors + ^bb0(%arg6: index): linalg.yield %cst : f32 } : tensor<4xf32> to tensor<4xf32> @@ -328,7 +328,7 @@ scf.yield %6 : index } %4 = linalg.pad_tensor %2 nofold low[%3] high[%3] { - ^bb0(%arg6: index): // no predecessors + ^bb0(%arg6: index): linalg.yield %cst : f32 } : tensor<4xf32> to tensor<4xf32> @@ -373,7 +373,7 @@ // Check the fused and padded fill op does not prevent hoisting. %4 = linalg.pad_tensor %2 nofold low[%c0, %c0] high[%3, %c0] { - ^bb0(%arg5: index, %arg6: index): // no predecessors + ^bb0(%arg5: index, %arg6: index): linalg.yield %cst : f32 } : tensor to tensor<5x24xf32> %5 = linalg.fill(%cst, %4) : f32, tensor<5x24xf32> -> tensor<5x24xf32> @@ -394,18 +394,18 @@ %10 = tensor.extract_slice %arg1[%arg5, 0] [3, 24] [1, 1] : tensor<6x24xf32> to tensor<3x24xf32> %11 = tensor.extract_slice %arg6[0, 0] [%1, 24] [1, 1] : tensor to tensor %12 = linalg.pad_tensor %9 nofold low[%c0, %c0] high[%3, %c0] { - ^bb0(%arg7: index, %arg8: index): // no predecessors + ^bb0(%arg7: index, %arg8: index): linalg.yield %cst : f32 } : tensor to tensor<5x3xf32> %13 = linalg.pad_tensor %10 nofold low[%c0, %c0] high[%c0, %c0] { - ^bb0(%arg7: index, %arg8: index): // no predecessors + ^bb0(%arg7: index, %arg8: index): linalg.yield %cst : f32 } : tensor<3x24xf32> to tensor<3x24xf32> // Check the output padding is not hoisted. // MATMUL: %[[T8:.*]] = linalg.pad_tensor %14 = linalg.pad_tensor %11 nofold low[%c0, %c0] high[%3, %c0] { - ^bb0(%arg7: index, %arg8: index): // no predecessors + ^bb0(%arg7: index, %arg8: index): linalg.yield %cst : f32 } : tensor to tensor<5x24xf32> diff --git a/mlir/test/Dialect/Linalg/inline-scalar-operands.mlir b/mlir/test/Dialect/Linalg/inline-scalar-operands.mlir --- a/mlir/test/Dialect/Linalg/inline-scalar-operands.mlir +++ b/mlir/test/Dialect/Linalg/inline-scalar-operands.mlir @@ -14,7 +14,7 @@ ins(%arg0, %scalar : tensor<4xf32>, tensor) outs(%0 : tensor<4xf32>) { // CHECK: ^bb0(%{{.*}}: f32, %{{.*}}: f32) - ^bb0(%arg1: f32, %arg2: f32, %arg3: f32): // no predecessors + ^bb0(%arg1: f32, %arg2: f32, %arg3: f32): // CHECK: tensor.extract %[[SCALAR]][] %2 = arith.divf %arg1, %arg2 : f32 linalg.yield %2 : f32 @@ -39,7 +39,7 @@ ins(%arg0, %scalar : tensor<4xf32>, tensor<1xf32>) outs(%0 : tensor<4xf32>) { // CHECK: ^bb0(%{{.*}}: f32, %{{.*}}: f32) - ^bb0(%arg1: f32, %arg2: f32, %arg3: f32): // no predecessors + ^bb0(%arg1: f32, %arg2: f32, %arg3: f32): // CHECK: tensor.extract %[[SCALAR]][%[[ZERO]]] %2 = arith.divf %arg1, %arg2 : f32 linalg.yield %2 : f32 diff --git a/mlir/test/Dialect/Linalg/invalid.mlir b/mlir/test/Dialect/Linalg/invalid.mlir --- a/mlir/test/Dialect/Linalg/invalid.mlir +++ b/mlir/test/Dialect/Linalg/invalid.mlir @@ -357,7 +357,7 @@ func @pad_result_type(%arg0: tensor, %arg1: index, %arg2: i32) -> tensor { // expected-error @+1 {{specified type 'tensor' does not match the inferred type 'tensor}} %0 = linalg.pad_tensor %arg0 low[1, %arg1, 2, 2] high[1, 2, %arg1, 3] { - ^bb0(%arg3: index, %arg4: index): // no predecessors + ^bb0(%arg3: index, %arg4: index): linalg.yield %arg2 : i32 } : tensor to tensor return %0 : tensor @@ -368,7 +368,7 @@ func @pad_number_of_block_args(%arg0: tensor, %arg1: i32) -> tensor { // expected-error @+1 {{expected the block to have 2 arguments}} %0 = linalg.pad_tensor %arg0 low[1, 2] high[2, 3] { - ^bb0(%arg2: index, %arg3: index, %arg4: index): // no predecessors + ^bb0(%arg2: index, %arg3: index, %arg4: index): linalg.yield %arg1 : i32 } : tensor to tensor return %0 : tensor @@ -388,7 +388,7 @@ func @pad_block_args(%arg0: tensor, %arg1: i32) -> tensor { // expected-error @+1 {{op expected block argument 1 to be an index}} %0 = linalg.pad_tensor %arg0 low[1, 2] high[2, 3] { - ^bb0(%arg2: i32, %arg3: i32): // no predecessors + ^bb0(%arg2: i32, %arg3: i32): linalg.yield %arg1 : i32 } : tensor to tensor return %0 : tensor @@ -399,7 +399,7 @@ func @pad_num_yields(%arg0: tensor, %arg1: i32) -> tensor { // expected-error @+3 {{op expected single yield operand (got 2)}} %0 = linalg.pad_tensor %arg0 low[1, 2] high[2, 3] { - ^bb0(%arg2: index, %arg3: index): // no predecessors + ^bb0(%arg2: index, %arg3: index): linalg.yield %arg1, %arg1 : i32, i32 } : tensor to tensor return %0 : tensor @@ -410,7 +410,7 @@ func @pad_yield_type(%arg0: tensor, %arg1: i8) -> tensor { // expected-error @+3 {{op expected yield type to match shape element type}} %0 = linalg.pad_tensor %arg0 low[1, 2] high[2, 3] { - ^bb0(%arg2: index, %arg3: index): // no predecessors + ^bb0(%arg2: index, %arg3: index): linalg.yield %arg1 : i8 } : tensor to tensor return %0 : tensor diff --git a/mlir/test/Dialect/Linalg/loops.mlir b/mlir/test/Dialect/Linalg/loops.mlir --- a/mlir/test/Dialect/Linalg/loops.mlir +++ b/mlir/test/Dialect/Linalg/loops.mlir @@ -573,7 +573,7 @@ func @generic_const_init(%arg0: memref) { %cst = arith.constant 1.0 : f32 linalg.generic #trait_const_fill outs(%arg0 : memref) { - ^bb0(%arg1: f32): // no predecessors + ^bb0(%arg1: f32): linalg.yield %cst : f32 } return diff --git a/mlir/test/Dialect/Linalg/lower-pad-tensor.mlir b/mlir/test/Dialect/Linalg/lower-pad-tensor.mlir --- a/mlir/test/Dialect/Linalg/lower-pad-tensor.mlir +++ b/mlir/test/Dialect/Linalg/lower-pad-tensor.mlir @@ -7,7 +7,7 @@ %cst = arith.constant 0.000000e+00 : f32 %0 = bufferization.to_tensor %arg0 : memref<1x28x28x1xf32> %1 = linalg.pad_tensor %0 low[1, 1, 1, 2] high[0, 2, 2, 0] { - ^bb0(%arg1: index, %arg2: index, %arg3: index, %arg4: index): // no predecessors + ^bb0(%arg1: index, %arg2: index, %arg3: index, %arg4: index): linalg.yield %cst : f32 } : tensor<1x28x28x1xf32> to tensor<2x31x31x3xf32> %2 = bufferization.to_memref %1 : memref<2x31x31x3xf32> @@ -26,7 +26,7 @@ func @pad_tensor_no_memrefs(%arg0: tensor<1x28x28xf32>) -> tensor<2x32x32xf32> { %cst = arith.constant 0.000000e+00 : f32 %0 = linalg.pad_tensor %arg0 low[1, 2, 2] high[0, 2, 2] { - ^bb0(%arg1: index, %arg2: index, %arg3: index): // no predecessors + ^bb0(%arg1: index, %arg2: index, %arg3: index): linalg.yield %cst : f32 } : tensor<1x28x28xf32> to tensor<2x32x32xf32> return %0 : tensor<2x32x32xf32> @@ -44,7 +44,7 @@ func @pad_tensor_detailed(%arg0: tensor<1x28x28x1xf32>) -> tensor<1x32x32x1xf32> { %cst = arith.constant 0.000000e+00 : f32 %0 = linalg.pad_tensor %arg0 low[0, 2, 2, 0] high[0, 2, 2, 0] { - ^bb0(%arg1: index, %arg2: index, %arg3: index, %arg4: index): // no predecessors + ^bb0(%arg1: index, %arg2: index, %arg3: index, %arg4: index): linalg.yield %cst : f32 } : tensor<1x28x28x1xf32> to tensor<1x32x32x1xf32> return %0 : tensor<1x32x32x1xf32> diff --git a/mlir/test/Dialect/Linalg/named-ops.mlir b/mlir/test/Dialect/Linalg/named-ops.mlir --- a/mlir/test/Dialect/Linalg/named-ops.mlir +++ b/mlir/test/Dialect/Linalg/named-ops.mlir @@ -566,7 +566,7 @@ %arg0 : tensor, %arg2 : tensor, %arg1 : tensor) -> tensor { // expected-error @+1 {{unexpected input index map for convolutions}} %0 = "linalg.conv_2d_nhwc_hwcf"(%arg0, %arg1, %arg2) ({ - ^bb0(%arg3: f32, %arg4: f32, %arg5 : f32): // no predecessors + ^bb0(%arg3: f32, %arg4: f32, %arg5 : f32): %1 = "arith.mulf"(%arg3, %arg4) : (f32, f32) -> f32 %2 = "arith.addf"(%arg5, %1) : (f32, f32) -> f32 "linalg.yield"(%2) : (f32) -> () @@ -583,7 +583,7 @@ %arg0 : tensor, %arg1 : tensor, %arg2 : tensor) -> tensor { // expected-error @+1 {{expected output/filter indexing maps to be projected permutations}} %0 = "linalg.conv_2d_nhwc_hwcf"(%arg0, %arg1, %arg2) ({ - ^bb0(%arg3: f32, %arg4: f32, %arg5 : f32): // no predecessors + ^bb0(%arg3: f32, %arg4: f32, %arg5 : f32): %1 = "arith.mulf"(%arg3, %arg4) : (f32, f32) -> f32 %2 = "arith.addf"(%arg5, %1) : (f32, f32) -> f32 "linalg.yield"(%2) : (f32) -> () diff --git a/mlir/test/Dialect/Linalg/pad.mlir b/mlir/test/Dialect/Linalg/pad.mlir --- a/mlir/test/Dialect/Linalg/pad.mlir +++ b/mlir/test/Dialect/Linalg/pad.mlir @@ -202,7 +202,7 @@ // MATMUL: %[[T3:.*]] = linalg.fill(%{{.*}}, %[[T2]] %0 = tensor.extract_slice %arg0[0, 0] [%size, %size] [1, 1] : tensor<64x64xf32> to tensor %1 = linalg.pad_tensor %0 low[0, 0] high[%iv0, %iv0] { - ^bb0(%arg3: index, %arg4: index): // no predecessors + ^bb0(%arg3: index, %arg4: index): linalg.yield %cst : f32 } : tensor to tensor<64x64xf32> %2 = linalg.fill(%cst, %1) : f32, tensor<64x64xf32> -> tensor<64x64xf32> @@ -234,7 +234,7 @@ %size = affine.min #map0()[%iv0] %0 = tensor.extract_slice %arg0[0, 0] [%size, %size] [1, 1] : tensor<64x64xf32> to tensor %1 = linalg.pad_tensor %0 low[0, 0] high[%iv0, %iv0] { - ^bb0(%arg3: index, %arg4: index): // no predecessors + ^bb0(%arg3: index, %arg4: index): linalg.yield %cst : f32 } : tensor to tensor<64x64xf32> %2 = linalg.fill(%cst, %1) : f32, tensor<64x64xf32> -> tensor<64x64xf32> @@ -259,7 +259,7 @@ %size = affine.min #map0()[%iv0] %0 = tensor.extract_slice %arg0[0, 0] [%iv0, %iv0] [1, 1] : tensor<64x64xf32> to tensor %1 = linalg.pad_tensor %0 low[0, 0] high[%iv0, %iv0] { - ^bb0(%arg3: index, %arg4: index): // no predecessors + ^bb0(%arg3: index, %arg4: index): linalg.yield %cst : f32 } : tensor to tensor<64x64xf32> %2 = linalg.fill(%cst, %1) : f32, tensor<64x64xf32> -> tensor<64x64xf32> @@ -284,7 +284,7 @@ %size = affine.min #map0()[%iv0] %0 = tensor.extract_slice %arg0[0, 0, 0] [%size, %size, 1] [1, 1, 1] : tensor<64x64x1xf32> to tensor %1 = linalg.pad_tensor %0 low[0, 0] high[%iv0, %iv0] { - ^bb0(%arg3: index, %arg4: index): // no predecessors + ^bb0(%arg3: index, %arg4: index): linalg.yield %cst : f32 } : tensor to tensor<64x64xf32> %2 = linalg.fill(%cst, %1) : f32, tensor<64x64xf32> -> tensor<64x64xf32> @@ -309,7 +309,7 @@ %size = affine.min #map0()[%iv0] %0 = tensor.extract_slice %arg0[0, 0] [%size, %size] [1, 1] : tensor<62x62xf32> to tensor %1 = linalg.pad_tensor %0 low[0, 0] high[%iv0, %iv0] { - ^bb0(%arg3: index, %arg4: index): // no predecessors + ^bb0(%arg3: index, %arg4: index): linalg.yield %cst : f32 } : tensor to tensor<62x62xf32> %2 = linalg.fill(%cst, %1) : f32, tensor<62x62xf32> -> tensor<62x62xf32> diff --git a/mlir/test/Dialect/Linalg/parallel-loops.mlir b/mlir/test/Dialect/Linalg/parallel-loops.mlir --- a/mlir/test/Dialect/Linalg/parallel-loops.mlir +++ b/mlir/test/Dialect/Linalg/parallel-loops.mlir @@ -9,7 +9,7 @@ iterator_types = ["parallel", "parallel"]} ins(%lhs, %rhs : memref<2x2xf32>, memref<2x2xf32>) outs(%sum : memref<2x2xf32>) { - ^bb0(%lhs_in: f32, %rhs_in: f32, %sum_out: f32): // no predecessors + ^bb0(%lhs_in: f32, %rhs_in: f32, %sum_out: f32): %0 = arith.addf %lhs_in, %rhs_in : f32 linalg.yield %0 : f32 } diff --git a/mlir/test/Dialect/Linalg/reshape_fusion.mlir b/mlir/test/Dialect/Linalg/reshape_fusion.mlir --- a/mlir/test/Dialect/Linalg/reshape_fusion.mlir +++ b/mlir/test/Dialect/Linalg/reshape_fusion.mlir @@ -15,7 +15,7 @@ iterator_types = ["parallel", "parallel", "parallel"]} ins(%0, %arg1, %arg2 : tensor, tensor, f32) outs(%0 : tensor) { - ^bb0(%arg3: f32, %arg4: f32, %arg5: f32, %s: f32): // no predecessors + ^bb0(%arg3: f32, %arg4: f32, %arg5: f32, %s: f32): %1 = arith.mulf %arg3, %arg4 : f32 %2 = arith.addf %1, %arg5 : f32 linalg.yield %2 : f32 @@ -58,7 +58,7 @@ iterator_types = ["parallel", "parallel"]} ins(%arg0, %arg1, %arg2 : tensor, tensor, f32) outs(%arg0 : tensor) { - ^bb0(%arg3: f32, %arg4: f32, %arg5: f32, %s: f32): // no predecessors + ^bb0(%arg3: f32, %arg4: f32, %arg5: f32, %s: f32): %1 = arith.mulf %arg3, %arg4 : f32 %2 = arith.addf %1, %arg5 : f32 linalg.yield %2 : f32 @@ -143,7 +143,7 @@ iterator_types = ["parallel", "parallel"]} ins(%arg0, %cst : tensor<264x4xf32>, tensor<264x4xf32>) outs(%0 : tensor<264x4xf32>) { - ^bb0(%arg1: f32, %arg2: f32, %s: f32): // no predecessors + ^bb0(%arg1: f32, %arg2: f32, %s: f32): %2 = arith.mulf %arg1, %arg2 : f32 linalg.yield %2 : f32 } -> tensor<264x4xf32> @@ -230,7 +230,7 @@ iterator_types = ["parallel", "parallel"]} ins(%arg0, %arg1 : tensor, tensor) outs(%arg0 : tensor) { - ^bb0(%arg3: i32, %arg4: i32, %s: i32): // no predecessors + ^bb0(%arg3: i32, %arg4: i32, %s: i32): %idx0 = linalg.index 0 : index %idx1 = linalg.index 1 : index %1 = arith.muli %arg3, %arg4 : i32 @@ -345,7 +345,7 @@ iterator_types = ["parallel", "parallel", "parallel"]} ins(%0 : tensor<264x?xi32>) outs(%shape : tensor<264x?x4xi32>) { - ^bb0(%arg1: i32, %s: i32): // no predecessors + ^bb0(%arg1: i32, %s: i32): %idx0 = linalg.index 0 : index %idx1 = linalg.index 1 : index %idx2 = linalg.index 2 : index @@ -401,7 +401,7 @@ iterator_types = ["parallel", "parallel"]} ins(%arg0, %arg1 : tensor, tensor) outs(%arg0 : tensor) { - ^bb0(%arg3: f32, %arg4: f32, %s: f32): // no predecessors + ^bb0(%arg3: f32, %arg4: f32, %s: f32): %1 = arith.mulf %arg3, %arg4 : f32 linalg.yield %1 : f32 } -> tensor @@ -439,7 +439,7 @@ affine_map<(d0, d1) -> (d0, d1)>], iterator_types = ["parallel", "parallel"]} ins(%0 : tensor<5xf32>) outs(%1 : tensor<5x5xf32>) { - ^bb0(%arg2: f32, %arg3: f32): // no predecessors + ^bb0(%arg2: f32, %arg3: f32): linalg.yield %arg2 : f32 } -> tensor<5x5xf32> return %2 : tensor<5x5xf32> @@ -458,7 +458,7 @@ affine_map<(d0, d1) -> (d0, d1)>], iterator_types = ["parallel", "parallel"]} ins(%arg0 : tensor<5xf32>) outs(%0 : tensor<5x5xf32>) { - ^bb0(%arg2: f32, %arg3: f32): // no predecessors + ^bb0(%arg2: f32, %arg3: f32): linalg.yield %arg2 : f32 } -> tensor<5x5xf32> %2 = tensor.expand_shape %1 [[0, 1], [2]] @@ -487,7 +487,7 @@ iterator_types = ["parallel", "parallel", "parallel"]} ins(%0, %arg1 : tensor, tensor) outs(%2 : tensor) { - ^bb0(%arg2: f32, %arg3: f32, %arg4: f32): // no predecessors + ^bb0(%arg2: f32, %arg3: f32, %arg4: f32): %4 = arith.mulf %arg2, %arg3 : f32 linalg.yield %4 : f32 } -> tensor @@ -543,7 +543,7 @@ iterator_types = ["parallel"]} ins(%0, %arg1 : tensor<1xi64>, tensor) outs(%1 : tensor<1xi64>) { - ^bb0(%arg4: i64, %arg5: i64, %arg6: i64): // no predecessors + ^bb0(%arg4: i64, %arg5: i64, %arg6: i64): %3 = arith.addi %arg4, %arg5 : i64 linalg.yield %3 : i64 } -> tensor<1xi64> diff --git a/mlir/test/Dialect/Linalg/reshape_linearization_fusion.mlir b/mlir/test/Dialect/Linalg/reshape_linearization_fusion.mlir --- a/mlir/test/Dialect/Linalg/reshape_linearization_fusion.mlir +++ b/mlir/test/Dialect/Linalg/reshape_linearization_fusion.mlir @@ -10,7 +10,7 @@ iterator_types = ["parallel", "parallel", "parallel", "parallel"] } ins(%0 : tensor) outs(%0 : tensor) { - ^bb0(%arg6: i32, %arg7 : i32): // no predecessors + ^bb0(%arg6: i32, %arg7 : i32): %idx = linalg.index 0 : index %2 = arith.index_cast %idx : index to i32 %3 = arith.addi %arg6, %2 : i32 @@ -40,7 +40,7 @@ indexing_maps = [#map0, #map0], iterator_types = ["parallel", "parallel", "parallel", "parallel"] } ins(%arg0 : tensor) outs(%arg0 : tensor) { - ^bb0(%arg6: i32, %arg7: i32): // no predecessors + ^bb0(%arg6: i32, %arg7: i32): %idx = linalg.index 0 : index %2 = arith.index_cast %idx : index to i32 %3 = arith.addi %arg6, %2 : i32 @@ -75,7 +75,7 @@ {indexing_maps = [#map2, #map3], iterator_types = ["parallel", "parallel", "parallel"]} ins(%0 : tensor<3x5x7xf32>) outs(%1 : tensor<3x7x5xf32>) { - ^bb0(%arg2: f32, %arg3 : f32): // no predecessors + ^bb0(%arg2: f32, %arg3 : f32): linalg.yield %arg2 : f32 } -> tensor<3x7x5xf32> return %2 : tensor<3x7x5xf32> @@ -100,7 +100,7 @@ {indexing_maps = [#map2, #map3], iterator_types = ["parallel", "parallel", "parallel"]} ins(%0 : tensor<3x5x7xf32>) outs(%1 : tensor<5x7x3xf32>) { - ^bb0(%arg2: f32, %arg3: f32): // no predecessors + ^bb0(%arg2: f32, %arg3: f32): linalg.yield %arg2 : f32 } -> tensor<5x7x3xf32> return %2 : tensor<5x7x3xf32> @@ -127,7 +127,7 @@ {indexing_maps = [#map2, #map3], iterator_types = ["parallel", "parallel", "parallel"]} ins(%0 : tensor<3x5x7xf32>) outs(%1 : tensor<5x3x7xf32>) { - ^bb0(%arg2: f32, %arg3: f32): // no predecessors + ^bb0(%arg2: f32, %arg3: f32): linalg.yield %arg2 : f32 } -> tensor<5x3x7xf32> return %2 : tensor<5x3x7xf32> @@ -153,7 +153,7 @@ {indexing_maps = [#map0, #map1], iterator_types = ["parallel", "parallel", "parallel"]} ins(%arg0 : tensor<3x5x7xf32>) outs(%0 : tensor<5x3x7xf32>) { - ^bb0(%arg2: f32, %arg3 : f32): // no predecessors + ^bb0(%arg2: f32, %arg3 : f32): linalg.yield %arg2 : f32 } -> tensor<5x3x7xf32> %2 = tensor.collapse_shape %1 [[0], [1, 2]] @@ -184,7 +184,7 @@ iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%arg0, %arg1 : tensor, tensor) outs(%arg0 : tensor) { - ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): // no predecessors + ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): %1 = arith.mulf %arg3, %arg4 : f32 linalg.yield %1 : f32 } -> tensor @@ -209,7 +209,7 @@ affine_map<(d0, d1) -> (d0, d1)>], iterator_types = ["parallel", "parallel"]} ins(%arg0 : tensor<6x1xf32>) outs(%0 : tensor<6x1xi32>) { - ^bb0(%arg3: f32, %arg4: i32): // no predecessors + ^bb0(%arg3: f32, %arg4: i32): %5 = arith.fptosi %arg3 : f32 to i32 linalg.yield %5 : i32 } -> tensor<6x1xi32> diff --git a/mlir/test/Dialect/Linalg/roundtrip.mlir b/mlir/test/Dialect/Linalg/roundtrip.mlir --- a/mlir/test/Dialect/Linalg/roundtrip.mlir +++ b/mlir/test/Dialect/Linalg/roundtrip.mlir @@ -259,7 +259,7 @@ linalg.generic {indexing_maps = [#map0], iterator_types = ["parallel", "parallel", "parallel"]} outs(%arg0 : memref) { - ^bb0(%arg3: f32): // no predecessors + ^bb0(%arg3: f32): %cst = arith.constant 0.000000e+00 : f32 linalg.yield %cst : f32 } @@ -322,7 +322,7 @@ iterator_types = ["reduction"]} ins(%arg0, %arg1 : tensor, tensor) outs(%1, %3 : tensor, tensor) { - ^bb0(%arg3: i32, %arg4: i32, %arg5: i32, %arg6: i32): // no predecessors + ^bb0(%arg3: i32, %arg4: i32, %arg5: i32, %arg6: i32): %5 = arith.cmpi sge, %arg3, %arg5 : i32 %6 = select %5, %arg3, %arg5 : i32 %7 = arith.cmpi eq, %arg3, %arg5 : i32 diff --git a/mlir/test/Dialect/Linalg/tile-and-fuse-on-tensors.mlir b/mlir/test/Dialect/Linalg/tile-and-fuse-on-tensors.mlir --- a/mlir/test/Dialect/Linalg/tile-and-fuse-on-tensors.mlir +++ b/mlir/test/Dialect/Linalg/tile-and-fuse-on-tensors.mlir @@ -106,7 +106,7 @@ %c24 = arith.constant 24 : index %c4 = arith.constant 4 : index %0 = linalg.generic {indexing_maps = [#map0, #map1], iterator_types = ["parallel", "reduction", "parallel"]} ins(%arg3 : tensor<12x7x25xf32>) outs(%arg1 : tensor<12x25xf32>) { - ^bb0(%arg4: f32, %arg5: f32): // no predecessors + ^bb0(%arg4: f32, %arg5: f32): %2 = arith.addf %arg4, %arg5 : f32 linalg.yield %2 : f32 } -> tensor<12x25xf32> @@ -150,7 +150,7 @@ %c24 = arith.constant 24 : index %c4 = arith.constant 4 : index %0 = linalg.generic {indexing_maps = [#map0, #map1], iterator_types = ["parallel", "parallel"]} ins(%arg3 : tensor<12x24xf32>) outs(%arg0 : tensor<24x12xf32>) { - ^bb0(%arg4: f32, %arg5: f32): // no predecessors + ^bb0(%arg4: f32, %arg5: f32): %2 = arith.addf %arg4, %arg5 : f32 linalg.yield %2 : f32 } -> tensor<24x12xf32> @@ -219,7 +219,7 @@ %c24 = arith.constant 24 : index %c4 = arith.constant 4 : index %0 = linalg.generic {indexing_maps = [#map0], iterator_types = ["parallel", "parallel"]} outs(%arg1 : tensor<12x25xi32>) { - ^bb0(%arg3: i32): // no predecessors + ^bb0(%arg3: i32): %6 = linalg.index 0 : index %7 = linalg.index 1 : index %8 = arith.addi %6, %7 : index @@ -272,7 +272,7 @@ // GENERIC-SAME: %[[IV1]] // GENERIC: linalg.generic {{.*}} ins(%[[T2]] {{.*}} outs(%[[T3]] %2 = linalg.generic {indexing_maps = [#map0, #map1], iterator_types = ["parallel", "reduction"]} ins(%0 : tensor<10x17xf32>) outs(%1 : tensor<10xf32>) { - ^bb0(%arg2: f32, %arg3: f32): // no predecessors + ^bb0(%arg2: f32, %arg3: f32): %3 = arith.addf %arg2, %arg3 : f32 linalg.yield %3 : f32 } -> tensor<10xf32> @@ -315,7 +315,7 @@ // GENERIC-SAME: , %[[UB1]] // GENERIC: %[[T1:.*]] = linalg.fill(%{{.*}}, %[[T0]]) %1 = linalg.generic {indexing_maps = [#map0, #map1], iterator_types = ["parallel", "parallel"]} ins(%0 : tensor<10x17xf32>) outs(%arg1 : tensor<10x8xf32>) { - ^bb0(%arg2: f32, %arg3: f32): // no predecessors + ^bb0(%arg2: f32, %arg3: f32): %2 = arith.addf %arg2, %arg3 : f32 linalg.yield %2 : f32 } -> tensor<10x8xf32> diff --git a/mlir/test/Dialect/Linalg/tile.mlir b/mlir/test/Dialect/Linalg/tile.mlir --- a/mlir/test/Dialect/Linalg/tile.mlir +++ b/mlir/test/Dialect/Linalg/tile.mlir @@ -318,7 +318,7 @@ linalg.generic #pointwise_2d_trait ins(%arg0, %arg1 : memref, memref) outs(%arg2 : memref) { - ^bb0(%arg4: f32, %arg5: f32, %arg6: f32): // no predecessors + ^bb0(%arg4: f32, %arg5: f32, %arg6: f32): %4 = arith.addf %arg4, %arg5 : f32 linalg.yield %4 : f32 } diff --git a/mlir/test/Dialect/Linalg/vectorization.mlir b/mlir/test/Dialect/Linalg/vectorization.mlir --- a/mlir/test/Dialect/Linalg/vectorization.mlir +++ b/mlir/test/Dialect/Linalg/vectorization.mlir @@ -462,7 +462,7 @@ iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%B, %A, %A, %B: memref<4x4xf32>, memref<4xf32>, memref<4xf32>, memref<4x4xf32>) outs(%C : memref<4x4x4x4xf32>) { - ^bb0(%arg0: f32, %arg1: f32, %arg2: f32, %arg3: f32, %arg4: f32): // no predecessors + ^bb0(%arg0: f32, %arg1: f32, %arg2: f32, %arg3: f32, %arg4: f32): %s = arith.subf %arg0, %arg1 : f32 %a = arith.addf %arg2, %s : f32 %b = arith.addf %arg3, %a : f32 @@ -775,7 +775,7 @@ ], iterator_types = ["parallel", "parallel", "reduction"] } ins(%input : tensor<4x16x8xf32>) outs(%output : tensor<4x16xf32>) { - ^bb0(%arg0: f32, %arg1: f32): // no predecessors + ^bb0(%arg0: f32, %arg1: f32): %1 = math.exp %arg0 : f32 %2 = arith.addf %1, %arg1 : f32 linalg.yield %2 : f32 @@ -811,7 +811,7 @@ ], iterator_types = ["parallel", "reduction", "reduction", "parallel"] } ins(%input, %input_2 : tensor<3x2xf32>, tensor<5x4xf32>) outs(%output : tensor<5x2xf32>) { - ^bb0(%arg0: f32, %arg1: f32, %arg2: f32): // no predecessors + ^bb0(%arg0: f32, %arg1: f32, %arg2: f32): %1 = math.exp %arg0 : f32 %2 = math.exp %arg1 : f32 %3 = arith.addf %1, %2 : f32 @@ -838,7 +838,7 @@ affine_map<(d0, d1) -> (d0)>], iterator_types = ["parallel", "reduction"]} ins(%arg0 : tensor<4x4xf32>) outs(%fill : tensor<4xf32>) { - ^bb0(%in0: f32, %out0: f32): // no predecessors + ^bb0(%in0: f32, %out0: f32): %max = arith.maxf %in0, %out0 : f32 linalg.yield %max : f32 } -> tensor<4xf32> @@ -863,7 +863,7 @@ affine_map<(d0, d1) -> (d0)>], iterator_types = ["parallel", "reduction"]} ins(%arg0 : tensor<4x4xf32>) outs(%fill : tensor<4xf32>) { - ^bb0(%in0: f32, %out0: f32): // no predecessors + ^bb0(%in0: f32, %out0: f32): %min = arith.minf %out0, %in0 : f32 linalg.yield %min : f32 } -> tensor<4xf32> @@ -887,7 +887,7 @@ affine_map<(d0, d1) -> (d0)>], iterator_types = ["parallel", "reduction"]} ins(%arg0 : tensor<4x4xf32>) outs(%fill : tensor<4xf32>) { - ^bb0(%in0: f32, %out0: f32): // no predecessors + ^bb0(%in0: f32, %out0: f32): %mul = arith.mulf %in0, %out0 : f32 linalg.yield %mul : f32 } -> tensor<4xf32> @@ -910,7 +910,7 @@ affine_map<(d0, d1) -> (d0)>], iterator_types = ["parallel", "reduction"]} ins(%arg0 : tensor<4x4xi1>) outs(%fill : tensor<4xi1>) { - ^bb0(%in0: i1, %out0: i1): // no predecessors + ^bb0(%in0: i1, %out0: i1): %or = arith.ori %in0, %out0 : i1 linalg.yield %or : i1 } -> tensor<4xi1> @@ -933,7 +933,7 @@ affine_map<(d0, d1) -> (d0)>], iterator_types = ["parallel", "reduction"]} ins(%arg0 : tensor<4x4xi1>) outs(%fill : tensor<4xi1>) { - ^bb0(%in0: i1, %out0: i1): // no predecessors + ^bb0(%in0: i1, %out0: i1): %and = arith.andi %in0, %out0 : i1 linalg.yield %and : i1 } -> tensor<4xi1> @@ -956,7 +956,7 @@ affine_map<(d0, d1) -> (d0)>], iterator_types = ["parallel", "reduction"]} ins(%arg0 : tensor<4x4xi1>) outs(%fill : tensor<4xi1>) { - ^bb0(%in0: i1, %out0: i1): // no predecessors + ^bb0(%in0: i1, %out0: i1): %xor = arith.xori %in0, %out0 : i1 linalg.yield %xor : i1 } -> tensor<4xi1> @@ -1051,7 +1051,7 @@ iterator_types = ["reduction"]} ins(%arg0 : tensor<32xf32>) outs(%1 : tensor) { - ^bb0(%a: f32, %b: f32): // no predecessors + ^bb0(%a: f32, %b: f32): %3 = arith.addf %a, %b : f32 linalg.yield %3 : f32 } -> tensor diff --git a/mlir/test/Dialect/SCF/canonicalize.mlir b/mlir/test/Dialect/SCF/canonicalize.mlir --- a/mlir/test/Dialect/SCF/canonicalize.mlir +++ b/mlir/test/Dialect/SCF/canonicalize.mlir @@ -839,7 +839,7 @@ // CHECK-NEXT: %[[cmp:.+]] = "test.condition"() : () -> i1 // CHECK-NEXT: scf.condition(%[[cmp]]) %[[cmp]] : i1 // CHECK-NEXT: } do { -// CHECK-NEXT: ^bb0(%arg0: i1): // no predecessors +// CHECK-NEXT: ^bb0(%arg0: i1): // CHECK-NEXT: "test.use"(%[[true]]) : (i1) -> () // CHECK-NEXT: scf.yield // CHECK-NEXT: } @@ -862,7 +862,7 @@ // CHECK-NEXT: %[[cmp:.*]] = "test.condition"(%[[arg2]]) : (i32) -> i1 // CHECK-NEXT: scf.condition(%[[cmp]]) %[[arg2]] : i32 // CHECK-NEXT: } do { -// CHECK-NEXT: ^bb0(%[[post:.+]]: i32): // no predecessors +// CHECK-NEXT: ^bb0(%[[post:.+]]: i32): // CHECK-NEXT: %[[next:.+]] = "test.use"(%[[post]]) : (i32) -> i32 // CHECK-NEXT: scf.yield %[[next]] : i32 // CHECK-NEXT: } @@ -890,7 +890,7 @@ // CHECK-NEXT: %{{.*}} = "test.get_some_value"() : () -> i64 // CHECK-NEXT: scf.condition(%[[cmp]]) %[[val]] : i32 // CHECK-NEXT: } do { -// CHECK-NEXT: ^bb0(%[[arg:.*]]: i32): // no predecessors +// CHECK-NEXT: ^bb0(%[[arg:.*]]: i32): // CHECK-NEXT: "test.use"(%[[arg]]) : (i32) -> () // CHECK-NEXT: scf.yield // CHECK-NEXT: } @@ -918,7 +918,7 @@ // CHECK-NEXT: %[[cmp:.+]] = arith.cmpi ne, %[[val]], %arg0 : i32 // CHECK-NEXT: scf.condition(%[[cmp]]) %[[val]] : i32 // CHECK-NEXT: } do { -// CHECK-NEXT: ^bb0(%arg1: i32): // no predecessors +// CHECK-NEXT: ^bb0(%arg1: i32): // CHECK-NEXT: "test.use"(%[[true]], %[[false]], %arg1) : (i1, i1, i32) -> () // CHECK-NEXT: scf.yield // CHECK-NEXT: } @@ -945,7 +945,7 @@ // CHECK-NEXT: %[[cmp:.+]] = arith.cmpi ne, %arg0, %[[val]] : i32 // CHECK-NEXT: scf.condition(%[[cmp]]) %[[val]] : i32 // CHECK-NEXT: } do { -// CHECK-NEXT: ^bb0(%arg1: i32): // no predecessors +// CHECK-NEXT: ^bb0(%arg1: i32): // CHECK-NEXT: "test.use"(%[[true]], %[[false]], %arg1) : (i1, i1, i32) -> () // CHECK-NEXT: scf.yield // CHECK-NEXT: } diff --git a/mlir/test/Dialect/Tosa/inlining.mlir b/mlir/test/Dialect/Tosa/inlining.mlir --- a/mlir/test/Dialect/Tosa/inlining.mlir +++ b/mlir/test/Dialect/Tosa/inlining.mlir @@ -9,11 +9,11 @@ // CHECK-NOT: @sub func @inlined_if_fn(%arg0: tensor, %arg1: tensor, %arg2: tensor) -> tensor { %0 = "tosa.cond_if"(%arg2, %arg0, %arg1) ({ - ^bb0(%arg3: tensor, %arg4: tensor): // no predecessors + ^bb0(%arg3: tensor, %arg4: tensor): %1 = call @add(%arg3, %arg4) : (tensor, tensor) -> tensor "tosa.yield"(%1) : (tensor) -> () }, { - ^bb0(%arg3: tensor, %arg4: tensor): // no predecessors + ^bb0(%arg3: tensor, %arg4: tensor): %1 = call @sub(%arg3, %arg4) : (tensor, tensor) -> tensor "tosa.yield"(%1) : (tensor) -> () }) : (tensor, tensor, tensor) -> tensor @@ -35,11 +35,11 @@ // Check that calls are inlined and functions eliminated: // CHECK-NOT: @while %1:4 = "tosa.while_loop"(%arg0, %arg1, %arg2, %arg3) ({ - ^bb0(%arg4: tensor, %arg5: tensor, %arg6: tensor, %arg7: tensor<10xi32>): // no predecessors + ^bb0(%arg4: tensor, %arg5: tensor, %arg6: tensor, %arg7: tensor<10xi32>): %2 = call @while_cond_40(%arg4, %arg5, %arg6, %arg7) : (tensor, tensor, tensor, tensor<10xi32>) -> tensor "tosa.yield"(%2) : (tensor) -> () }, { - ^bb0(%arg4: tensor, %arg5: tensor, %arg6: tensor, %arg7: tensor<10xi32>): // no predecessors + ^bb0(%arg4: tensor, %arg5: tensor, %arg6: tensor, %arg7: tensor<10xi32>): %2:4 = call @while_body_50(%arg4, %arg5, %arg6, %arg7) : (tensor, tensor, tensor, tensor<10xi32>) -> (tensor, tensor, tensor, tensor<10xi32>) "tosa.yield"(%2#0, %2#1, %2#2, %2#3) : (tensor, tensor, tensor, tensor<10xi32>) -> () }) : (tensor, tensor, tensor, tensor<10xi32>) -> (tensor, tensor, tensor, tensor<10xi32>) diff --git a/mlir/test/Dialect/Tosa/ops.mlir b/mlir/test/Dialect/Tosa/ops.mlir --- a/mlir/test/Dialect/Tosa/ops.mlir +++ b/mlir/test/Dialect/Tosa/ops.mlir @@ -506,11 +506,11 @@ // CHECK-LABEL: cond_if func @test_cond_if(%arg0: tensor, %arg1: tensor, %arg2: tensor) -> tensor { %0 = "tosa.cond_if"(%arg2, %arg0, %arg1) ({ - ^bb0(%arg3: tensor, %arg4: tensor): // no predecessors + ^bb0(%arg3: tensor, %arg4: tensor): %1 = "tosa.add"(%arg3, %arg4) : (tensor, tensor) -> tensor "tosa.yield"(%1) : (tensor) -> () }, { - ^bb0(%arg3: tensor, %arg4: tensor): // no predecessors + ^bb0(%arg3: tensor, %arg4: tensor): %1 = "tosa.sub"(%arg3, %arg4) : (tensor, tensor) -> tensor "tosa.yield"(%1) : (tensor) -> () }) : (tensor, tensor, tensor) -> tensor @@ -522,12 +522,12 @@ func @test_while_loop(%arg0: tensor<10xi32>, %arg1: tensor) { %0 = "tosa.const"() {value = dense<0> : tensor} : () -> tensor %1:3 = "tosa.while_loop"(%0, %0, %arg0) ({ - ^bb0(%arg2: tensor, %arg3: tensor, %arg4: tensor<10xi32>): // no predecessors + ^bb0(%arg2: tensor, %arg3: tensor, %arg4: tensor<10xi32>): %2 = "tosa.greater_equal"(%arg3, %arg1) : (tensor, tensor) -> tensor %3 = "tosa.logical_not"(%2) : (tensor) -> tensor "tosa.yield"(%3) : (tensor) -> () }, { - ^bb0(%arg2: tensor, %arg3: tensor, %arg4: tensor<10xi32>): // no predecessors + ^bb0(%arg2: tensor, %arg3: tensor, %arg4: tensor<10xi32>): %2 = "tosa.const"() {value = dense<1> : tensor} : () -> tensor %3 = "tosa.add"(%arg3, %2) : (tensor, tensor) -> tensor %4 = "tosa.reshape"(%2) {new_shape = [1]} : (tensor) -> tensor<1xi32> diff --git a/mlir/test/IR/region.mlir b/mlir/test/IR/region.mlir --- a/mlir/test/IR/region.mlir +++ b/mlir/test/IR/region.mlir @@ -79,7 +79,7 @@ // Region with single block and not terminator. // CHECK: unregistered_without_terminator "test.unregistered_without_terminator"() ({ - ^bb0: // no predecessors + ^bb0: }) : () -> () // ----- diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/test-comprehensive-bufferize.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/test-comprehensive-bufferize.mlir --- a/mlir/test/Integration/Dialect/Linalg/CPU/test-comprehensive-bufferize.mlir +++ b/mlir/test/Integration/Dialect/Linalg/CPU/test-comprehensive-bufferize.mlir @@ -22,7 +22,7 @@ %9 = tensor.extract_slice %arg1[%arg3] [2] [1] : tensor<64xf32> to tensor<2xf32> %10 = tensor.cast %9 : tensor<2xf32> to tensor %11 = linalg.pad_tensor %10 low[%c0] high[%c0] { - ^bb0(%arg5: index): // no predecessors + ^bb0(%arg5: index): linalg.yield %cst : f32 } : tensor to tensor<2xf32> %12 = tensor.insert_slice %11 into %arg4[%8, 0] [1, 2] [1, 1] : tensor<2xf32> into tensor @@ -39,7 +39,7 @@ %9 = tensor.extract_slice %arg0[%arg3] [2] [1] : tensor<64xf32> to tensor<2xf32> %10 = tensor.cast %9 : tensor<2xf32> to tensor %11 = linalg.pad_tensor %10 low[%c0] high[%c0] { - ^bb0(%arg5: index): // no predecessors + ^bb0(%arg5: index): linalg.yield %cst : f32 } : tensor to tensor<2xf32> %12 = tensor.insert_slice %11 into %arg4[%8, 0] [1, 2] [1, 1] : tensor<2xf32> into tensor diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/test-padtensor.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/test-padtensor.mlir --- a/mlir/test/Integration/Dialect/Linalg/CPU/test-padtensor.mlir +++ b/mlir/test/Integration/Dialect/Linalg/CPU/test-padtensor.mlir @@ -14,7 +14,7 @@ %cst = arith.constant 2.3 : f32 %c0 = arith.constant 0 : index %out = linalg.pad_tensor %dynamic low[%c0, %offset, %c0] high[%c0, %c0, %offset] { - ^bb0(%gen_arg1: index, %gen_arg2: index, %gen_arg3: index): // no predecessors + ^bb0(%gen_arg1: index, %gen_arg2: index, %gen_arg3: index): linalg.yield %cst : f32 } : tensor<1x?x3xf32> to tensor<1x?x?xf32> %unranked = tensor.cast %out: tensor<1x?x?xf32> to tensor<*xf32> diff --git a/mlir/test/python/ir/operation.py b/mlir/test/python/ir/operation.py --- a/mlir/test/python/ir/operation.py +++ b/mlir/test/python/ir/operation.py @@ -361,7 +361,7 @@ op1 = Operation.create("custom.op1", regions=1) block = op1.regions[0].blocks.append(i32, i32) # CHECK: "custom.op1"() ({ - # CHECK: ^bb0(%arg0: si32, %arg1: si32): // no predecessors + # CHECK: ^bb0(%arg0: si32, %arg1: si32): # CHECK: "custom.terminator"() : () -> () # CHECK: }) : () -> () terminator = Operation.create("custom.terminator")