[Mlir-commits] [mlir] [MLIR] Reduce generated assembly printer compile time (NFC) (PR #225740)

Jacques Pienaar llvmlistbot at llvm.org
Thu Sep 24 07:19:53 PDT 2026


================
@@ -3343,8 +3378,10 @@ void OperationFormat::genElementPrinter(FormatElement *element,
 }
 
 void OperationFormat::genPrinter(Operator &op, OpClass &opClass) {
+  // Declarative printers are generated for every operation. Favor smaller
+  // implementations to reduce both code size and optimizer work.
   auto *method = opClass.addMethod(
-      "void", "print",
+      "LLVM_ATTRIBUTE_MINSIZE void", "print",
----------------
jpienaar wrote:

Could you document the need for this above here?

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


More information about the Mlir-commits mailing list