[Mlir-commits] [mlir] [mlir][Printer] Honor --mlir-elide-resource-strings-if-larger when serializing of large blobs (PR #213920)
Natanael Cintean
llvmlistbot at llvm.org
Tue Aug 4 06:07:59 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
----------------
natanael-cintean wrote:
If we agree to remove testing based on debug output, I can remove this log altogheter. I added it only to have a way to test this specific branch in lit.
https://github.com/llvm/llvm-project/pull/213920
More information about the Mlir-commits
mailing list