Skip to content

Commit 6f5105c

Browse files
committed
More review fixups
1 parent b9a96c5 commit 6f5105c

File tree

4 files changed

+6
-49
lines changed

4 files changed

+6
-49
lines changed

mlir/lib/Dialect/ArmSME/Transforms/TileAllocation.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ coalesceTileLiveRanges(DenseMap<Value, LiveRange> &initialLiveRanges) {
414414
return std::move(coalescedLiveRanges);
415415
}
416416

417-
/// Greedily allocate tile IDs to live ranges spill using simple heuristics.
417+
/// Greedily allocate tile IDs to live ranges. Spill using simple heuristics.
418418
/// Note: This does not attempt to fill holes in live/allocated ranges.
419419
void allocateTilesToLiveRanges(ArrayRef<LiveRange *> liveRanges) {
420420
TileAllocator tileAllocator;
@@ -629,8 +629,8 @@ LogicalResult mlir::arm_sme::allocateSMETiles(FunctionOpInterface function,
629629
return failure();
630630
}
631631

632-
/// 6. Erase trivially dead tile operations (e.g. a ZeroOp with no
633-
/// users). This prevents the LLVM conversion needlessly inserting spills.
632+
// 6. Erase trivially dead tile operations (e.g. a ZeroOp with no
633+
// users). This prevents the LLVM conversion needlessly inserting spills.
634634
eraseTriviallyDeadTileOps(rewriter, function);
635635
return success();
636636
}
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// RUN: mlir-opt %s --pass-pipeline="builtin.module(func.func(convert-arm-sme-to-llvm))" \
2-
// RUN: -split-input-file -allow-unregistered-dialect -verify-diagnostics
1+
// RUN: mlir-opt %s --pass-pipeline="builtin.module(func.func(convert-arm-sme-to-llvm))" -verify-diagnostics
32

43
//===----------------------------------------------------------------------===//
54
// arm_sme.outerproduct
@@ -10,6 +9,6 @@ func.func @arm_sme_outerproduct_unsupported_type(%lhs : vector<[16]xi8>, %rhs :
109
// expected-error@+2 {{failed to legalize operation 'arm_sme.outerproduct'}}
1110
// expected-error@+1 {{unsupported type}}
1211
%0 = arm_sme.outerproduct %lhs, %rhs acc(%acc) : vector<[16]xi8>, vector<[16]xi8>
13-
"prevent.dce"(%0) : (vector<[16]x[16]xi8>) -> ()
12+
"test.some_use"(%0) : (vector<[16]x[16]xi8>) -> ()
1413
}
1514

mlir/test/Dialect/ArmSME/basic-tile-allocation.mlir

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,6 @@ func.func @za_b_overlapping_za_q() {
5656

5757
// -----
5858

59-
// CHECK-LABEL: za0_h
60-
func.func @za0_h() {
61-
// CHECK-NEXT: tile_id = 0
62-
%za0_h = arm_sme.get_tile : vector<[8]x[8]xi16>
63-
"test.some_use"(%za0_h) : (vector<[8]x[8]xi16>) -> ()
64-
return
65-
}
66-
67-
// -----
68-
6959
// CHECK-LABEL: za_h
7060
func.func @za_h() {
7161
// CHECK-NEXT: tile_id = 0
@@ -167,16 +157,6 @@ func.func @za_h_overlapping_za_q() {
167157

168158
// -----
169159

170-
// CHECK-LABEL: za0_s
171-
func.func @za0_s() {
172-
// CHECK-NEXT: tile_id = 0
173-
%za0_s = arm_sme.get_tile : vector<[4]x[4]xi32>
174-
"test.some_use"(%za0_s) : (vector<[4]x[4]xi32>) -> ()
175-
return
176-
}
177-
178-
// -----
179-
180160
// CHECK-LABEL: za_s
181161
func.func @za_s() {
182162
// CHECK-NEXT: tile_id = 0
@@ -277,16 +257,6 @@ func.func @za_s_overlapping_za_q() {
277257

278258
// -----
279259

280-
// CHECK-LABEL: za0_d
281-
func.func @za0_d() {
282-
// CHECK-NEXT: tile_id = 0
283-
%za0_d = arm_sme.get_tile : vector<[2]x[2]xi64>
284-
"test.some_use"(%za0_d) : (vector<[2]x[2]xi64>) -> ()
285-
return
286-
}
287-
288-
// -----
289-
290260
// CHECK-LABEL: za_d
291261
func.func @za_d() {
292262
// CHECK-NEXT: tile_id = 0
@@ -378,16 +348,6 @@ func.func @za_d_overlapping_za_q() {
378348

379349
// -----
380350

381-
// CHECK-LABEL: za0_q
382-
func.func @za0_q() {
383-
// CHECK-NEXT: tile_id = 0
384-
%za0_q = arm_sme.get_tile : vector<[1]x[1]xi128>
385-
"test.some_use"(%za0_q) : (vector<[1]x[1]xi128>) -> ()
386-
return
387-
}
388-
389-
// -----
390-
391351
// CHECK-LABEL: za_q
392352
func.func @za_q() {
393353
// CHECK-NEXT: tile_id = 0

mlir/test/Dialect/ArmSME/canonicalize.mlir

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
// RUN: mlir-opt -canonicalize -split-input-file -verify-diagnostics %s | mlir-opt | FileCheck %s
1+
// RUN: mlir-opt %s -canonicalize | mlir-opt | FileCheck %s
22

33
// This tests that dead tile values are removed from control flow.
44

5-
// -----
6-
75
// CHECK-LABEL: @unused_ssa_tile_is_removed_from_blocks
86
// CHECK-NOT: vector<[4]x[4]xf32>
97
func.func @unused_ssa_tile_is_removed_from_blocks(%arg0: memref<?x?xi32>) {

0 commit comments

Comments
 (0)