[Mlir-commits] [mlir] [mlir][python] remove various caching mechanism (PR #70831)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Oct 31 21:55:13 PDT 2023


================
@@ -57,15 +57,18 @@ void PyGlobals::loadDialectModule(llvm::StringRef dialectNamespace) {
     break;
   }
 
+  if (loaded.is_none())
+    return false;
   // Note: Iterator cannot be shared from prior to loading, since re-entrancy
   // may have occurred, which may do anything.
-  loadedDialectModulesCache.insert(dialectNamespace);
+  loadedDialectModules.insert(dialectNamespace);
+  return true;
----------------
rkayaith wrote:

I think the negative caching that used to happen here actually made sense (avoiding python interpreter work seems significant vs just C++ map lookups that the other caching potentially avoided)

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


More information about the Mlir-commits mailing list