[Mlir-commits] [mlir] [mlir] Skip the promised-interface lookup for an emptied dialect set (NFC) (PR #219545)

Mehdi Amini llvmlistbot at llvm.org
Sat Aug 29 02:07:38 PDT 2026


================
@@ -228,6 +228,9 @@ class Dialect {
   void handleUseOfUndefinedPromisedInterface(TypeID interfaceRequestorID,
                                              TypeID interfaceID,
                                              StringRef interfaceName = "") {
+    // Most dialects promise nothing; skip hashing a key and probing the set.
+    if (unresolvedPromisedInterfaces.empty())
+      return;
     if (unresolvedPromisedInterfaces.count(
----------------
joker-eph wrote:

Why check `NumBuckets`?

Also I don't quite get why both together would be different that just the check in doFind?


https://github.com/llvm/llvm-project/pull/219545


More information about the Mlir-commits mailing list