[Mlir-commits] [mlir] [mlir][tosa] Address review feedback from jpiennar (PR #87660)
Jacques Pienaar
llvmlistbot at llvm.org
Tue Apr 9 02:02:44 PDT 2024
================
@@ -39,30 +40,26 @@ namespace {
// type-inference related interface.
// When a non-replaceable use is encountered, the value is wrapped in a
// cast back to the original type after inference.
-bool isReplaceableUser(Operation *user) {
- // Handle unregistered dialects.
- if (!user->getDialect())
- return false;
-
- return user->getDialect()->getNamespace() ==
- TosaDialect::getDialectNamespace() ||
+bool canBeRefined(Operation *user) {
+ Dialect *tosaDialect = user->getContext()->getLoadedDialect<TosaDialect>();
----------------
jpienaar wrote:
This still results in a string lookup in map per invocation of this function. Using TypeID of the dialect would avoid that.
https://github.com/llvm/llvm-project/pull/87660
More information about the Mlir-commits
mailing list