[Mlir-commits] [mlir] [mlir] Skip the promised-interface lookup for an emptied dialect set (NFC) (PR #219545)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Aug 31 08:51:51 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(
----------------
khaki3 wrote:
The check in `doFind` adds one load of `NumEntries` to every lookup.
This PR adds the empty check in one place only, `handleUseOfUndefinedPromisedInterface`, so it skips the hash and probe there and leaves every other lookup untouched.
https://github.com/llvm/llvm-project/pull/219545
More information about the Mlir-commits
mailing list