[Mlir-commits] [mlir] e4c3950 - BEGIN_PUBLIC
Rahul Joshi
llvmlistbot at llvm.org
Mon Sep 19 09:49:18 PDT 2022
Author: Rahul Joshi
Date: 2022-09-19T09:48:39-07:00
New Revision: e4c395018efd41df256a2c7e517881e58dfc1ea6
URL: https://github.com/llvm/llvm-project/commit/e4c395018efd41df256a2c7e517881e58dfc1ea6
DIFF: https://github.com/llvm/llvm-project/commit/e4c395018efd41df256a2c7e517881e58dfc1ea6.diff
LOG: BEGIN_PUBLIC
Use isa<> instead of dyn_cast
END_PUBLIC
Differential Revision: https://reviews.llvm.org/D134092
Added:
Modified:
mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp
mlir/lib/Dialect/Func/Transforms/FuncConversions.cpp
mlir/lib/Dialect/Linalg/Transforms/Detensorize.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp b/mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp
index 8d45959800a8b..2074947fe33d7 100644
--- a/mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp
+++ b/mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp
@@ -687,7 +687,7 @@ static LogicalResult funcsToCoroutines(
if (isAllowedToBlock(func) ||
outlinedFunctions.find(func) == outlinedFunctions.end()) {
for (Operation &op : func.getBody().getOps()) {
- if (dyn_cast<AwaitOp>(op) || dyn_cast<AwaitAllOp>(op)) {
+ if (isa<AwaitOp, AwaitAllOp>(op)) {
funcWorklist.push_back(func);
break;
}
diff --git a/mlir/lib/Dialect/Func/Transforms/FuncConversions.cpp b/mlir/lib/Dialect/Func/Transforms/FuncConversions.cpp
index 7058b72b740d3..aec86abe9fb1f 100644
--- a/mlir/lib/Dialect/Func/Transforms/FuncConversions.cpp
+++ b/mlir/lib/Dialect/Func/Transforms/FuncConversions.cpp
@@ -143,7 +143,7 @@ bool mlir::isLegalForReturnOpTypeConversionPattern(Operation *op,
// If this is a `return` and the user pass wants to convert/transform across
// function boundaries, then `converter` is invoked to check whether the the
// `return` op is legal.
- if (dyn_cast<ReturnOp>(op) && !returnOpAlwaysLegal)
+ if (isa<ReturnOp>(op) && !returnOpAlwaysLegal)
return converter.isLegal(op);
// ReturnLike operations have to be legalized with their parent. For
diff --git a/mlir/lib/Dialect/Linalg/Transforms/Detensorize.cpp b/mlir/lib/Dialect/Linalg/Transforms/Detensorize.cpp
index 2e975693151fc..2a980ea96b5a3 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/Detensorize.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/Detensorize.cpp
@@ -397,7 +397,7 @@ struct LinalgDetensorize
// Note: No need to check whether the result type of this op is
// detensorable since if it wasn't we wouldn't reach that point in the
// work list.
- if (dyn_cast<tensor::FromElementsOp>(currentItemDefiningOp))
+ if (isa<tensor::FromElementsOp>(currentItemDefiningOp))
continue;
// 2.4 - The current item is the result of a scalar op, add all its
More information about the Mlir-commits
mailing list