@@ -40,12 +40,12 @@ namespace {
4040// ===----------------------------------------------------------------------===//
4141
4242// Common match failure reasons.
43- static constexpr StringLiteral MATCH_FAILURE_NOT_SME_TILE_TYPE_MULTIPLE (
43+ static constexpr StringLiteral kMatchFailureNotSMETileTypeMultiple (
4444 " op vector size is not multiple of SME tiles" );
45- static constexpr StringLiteral MATCH_FAILURE_UNSUPPORTED_MASK_OP (
45+ static constexpr StringLiteral kMatchFailureUnsupportedMaskOp (
4646 " op mask is unsupported for legalization/decomposition" );
4747static constexpr StringLiteral
48- MATCH_FAILURE_NON_PERMUTATION_MAP (" op affine map is not a permutation" );
48+ kMatchFailureNonPermutationMap (" op affine map is not a permutation" );
4949
5050// / An SMESubTile represents a single SME-sized sub-tile from decomposing a
5151// / larger vector type. The (`row`, `col`) are the position of the tile in the
@@ -174,8 +174,8 @@ struct LegalizeVectorOuterProductOpsByDecomposition
174174 OneToNPatternRewriter &rewriter) const override {
175175 auto vectorType = outerProductOp.getResultVectorType ();
176176 if (!isMultipleOfSMETileVectorType (vectorType))
177- return rewriter.notifyMatchFailure (
178- outerProductOp, MATCH_FAILURE_NOT_SME_TILE_TYPE_MULTIPLE );
177+ return rewriter.notifyMatchFailure (outerProductOp,
178+ kMatchFailureNotSMETileTypeMultiple );
179179
180180 Value mask;
181181 Operation *rootOp = outerProductOp;
@@ -188,7 +188,7 @@ struct LegalizeVectorOuterProductOpsByDecomposition
188188
189189 if (!isSupportedMaskOp (mask))
190190 return rewriter.notifyMatchFailure (outerProductOp,
191- MATCH_FAILURE_UNSUPPORTED_MASK_OP );
191+ kMatchFailureUnsupportedMaskOp );
192192
193193 ValueRange accSMETiles = adaptor.getAcc ();
194194 auto smeTileType = getSMETileTypeForElement (vectorType.getElementType ());
@@ -252,18 +252,18 @@ struct LegalizeTransferReadOpsByDecomposition
252252 OneToNPatternRewriter &rewriter) const override {
253253 auto vectorType = readOp.getVectorType ();
254254 if (!isMultipleOfSMETileVectorType (vectorType))
255- return rewriter.notifyMatchFailure (
256- readOp, MATCH_FAILURE_NOT_SME_TILE_TYPE_MULTIPLE );
255+ return rewriter.notifyMatchFailure (readOp,
256+ kMatchFailureNotSMETileTypeMultiple );
257257
258258 auto mask = readOp.getMask ();
259259 if (!isSupportedMaskOp (mask))
260260 return rewriter.notifyMatchFailure (readOp,
261- MATCH_FAILURE_UNSUPPORTED_MASK_OP );
261+ kMatchFailureUnsupportedMaskOp );
262262
263263 auto permutationMap = readOp.getPermutationMap ();
264264 if (!permutationMap.isPermutation ())
265265 return rewriter.notifyMatchFailure (readOp,
266- MATCH_FAILURE_NON_PERMUTATION_MAP );
266+ kMatchFailureNonPermutationMap );
267267
268268 // Note: For 2D vector types the only non-identity permutation is a simple
269269 // tranpose [1, 0].
@@ -300,18 +300,18 @@ struct LegalizeTransferWriteOpsByDecomposition
300300 OneToNPatternRewriter &rewriter) const override {
301301 auto vectorType = writeOp.getVectorType ();
302302 if (!isMultipleOfSMETileVectorType (vectorType))
303- return rewriter.notifyMatchFailure (
304- writeOp, MATCH_FAILURE_NOT_SME_TILE_TYPE_MULTIPLE );
303+ return rewriter.notifyMatchFailure (writeOp,
304+ kMatchFailureNotSMETileTypeMultiple );
305305
306306 auto mask = writeOp.getMask ();
307307 if (!isSupportedMaskOp (mask))
308308 return rewriter.notifyMatchFailure (writeOp,
309- MATCH_FAILURE_UNSUPPORTED_MASK_OP );
309+ kMatchFailureUnsupportedMaskOp );
310310
311311 auto permutationMap = writeOp.getPermutationMap ();
312312 if (!permutationMap.isPermutation ())
313313 return rewriter.notifyMatchFailure (writeOp,
314- MATCH_FAILURE_NON_PERMUTATION_MAP );
314+ kMatchFailureNonPermutationMap );
315315
316316 // Note: For 2D vector types the only non-identity permutation is a simple
317317 // tranpose [1, 0].
0 commit comments