[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
Tue Aug 4 06:21:16 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:
Debug output is useful for... debugging. It's orthogonal to the fact that we don't test it.
https://github.com/llvm/llvm-project/pull/213920
More information about the Mlir-commits
mailing list