[Mlir-commits] [mlir] [mlir][OpPrintingFlags] Allow to disable ElementsAttr hex printing (PR #85766)

Mehdi Amini llvmlistbot at llvm.org
Tue Mar 19 17:11:44 PDT 2024


================
@@ -1131,6 +1131,10 @@ class OpPrintingFlags {
   /// elements.
   OpPrintingFlags &elideLargeElementsAttrs(int64_t largeElementLimit = 16);
 
+  /// Enable or disable printing of large element attributes as a hex string. By
+  /// default, printing as hex is allowed (enabled).
+  OpPrintingFlags &allowPrintingElementsAttrWithHex(bool allowHex = true);
----------------
joker-eph wrote:

Considering we already have *printElementsAttrWithHexIfLarger* as part of the cl::opt, I would assume all you want is make this available as a C++ API indeed instead of adding another flag here.

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


More information about the Mlir-commits mailing list