================
@@ -147,6 +147,14 @@ def CIR_Dialect : Dialect {
mlir::Type parseType(mlir::DialectAsmParser &parser) const override;
void printType(mlir::Type type,
mlir::DialectAsmPrinter &printer) const override;
+
+ /// Returns true if \p ty and every type nested in it are CIR types.
+ /// Memoized, since FuncType verification re-queries the same records.
+ bool isPureCIRType(mlir::Type ty) const;
+
+ private:
+ mutable llvm::DenseMap<mlir::Type, bool> pureCIRTypeCache;
+ mutable std::mutex pureCIRTypeCacheMutex;
----------------
erichkeane wrote:
Hmm... ClangIR hasn't really been doing thread-safety yet, right? I guess I
see the value, but we probably need to spend time figuring out how we're going
to do everything else thread-safe.
https://github.com/llvm/llvm-project/pull/232863
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits