[Mlir-commits] [mlir] [mlir][linalg] Remove redundant checks for variable(NFC) (PR #122731)
Longsheng Mou
llvmlistbot at llvm.org
Mon Jan 13 07:49:03 PST 2025
https://github.com/CoTinker created https://github.com/llvm/llvm-project/pull/122731
This PR removes the redundant checks for the `supported` variable, as it's guaranteed to be true.
>From 3141aa0d2b2121bbda39aa51eb9a443a0a4da6b9 Mon Sep 17 00:00:00 2001
From: Longsheng Mou <longshengmou at gmail.com>
Date: Mon, 13 Jan 2025 23:41:25 +0800
Subject: [PATCH] [mlir][linalg] Remove redundant checks for variable(NFC)
This PR removes the redundant checks for the `supported` variable, as it's
guaranteed to be true.
---
mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp b/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
index a1d619c8cd19dc..a596a2ffdc9d93 100644
--- a/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
+++ b/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
@@ -3889,7 +3889,7 @@ DiagnosedSilenceableFailure transform::WinogradConv2DOp::applyToOne(
<< "this operation is not supported to convert to Winograd Conv2D";
}
- if (supported && failed(maybeTransformed)) {
+ if (failed(maybeTransformed)) {
return emitSilenceableError() << "apply Winograd Conv2D failed";
}
@@ -3927,7 +3927,7 @@ DiagnosedSilenceableFailure transform::DecomposeWinogradOp::applyToOne(
return diag;
}
- if (supported && failed(maybeTransformed)) {
+ if (failed(maybeTransformed)) {
DiagnosedSilenceableFailure diag =
emitSilenceableError() << "decompose Winograd operations failed";
diag.attachNote(target->getLoc()) << "target op";
More information about the Mlir-commits
mailing list