[Mlir-commits] [mlir] [mlir] Guard expensive string-based asserts behind EXPENSIVE_CHECKS (PR #93111)

Stella Laurenzo llvmlistbot at llvm.org
Wed May 22 18:32:19 PDT 2024


================
@@ -303,7 +300,7 @@ class AttributeInterface
 protected:
   /// Returns the impl interface instance for the given type.
   static typename InterfaceBase::Concept *getInterfaceFor(Attribute attr) {
-#ifndef NDEBUG
+#ifdef EXPENSIVE_CHECKS
----------------
stellaraccident wrote:

It's a balance. Subjectively, I think that asserts in milr are already over the line of being too expensive, but it is a fraught topic to bring up. I can't say whether this is one of the big culprits, but expensive checks in isa costing 3x of overall compile time is both troubling and would explain a lot based on my experience.

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


More information about the Mlir-commits mailing list