[Mlir-commits] [mlir] [mlir][Printer] Honor --mlir-elide-resource-strings-if-larger when serializing of large blobs (PR #213920)
Mehdi Amini
llvmlistbot at llvm.org
Thu Aug 20 02:20:38 PDT 2026
================
@@ -3570,6 +3587,15 @@ void OperationPrinter::printResourceFileMetadata(
if (charLimit.value() == 0)
return;
+ // Skip serializing entirely if the exact size already exceeds the
+ // limit, e.g. hex-encoding a large blob.
+ if (sizeHint >= 0 && uint64_t(sizeHint) > charLimit.value()) {
+ LLVM_DEBUG(llvm::dbgs() << "eliding resource '" << key
----------------
joker-eph wrote:
OK!
https://github.com/llvm/llvm-project/pull/213920
More information about the Mlir-commits
mailing list