[PATCH] D74922: [mlir][Parser] Update DenseElementsAttr to print in hex when the number of elements is over a certain threshold.
Mehdi AMINI via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 20 14:23:27 PST 2020
mehdi_amini accepted this revision.
mehdi_amini added inline comments.
This revision is now accepted and ready to land.
================
Comment at: mlir/lib/IR/AsmPrinter.cpp:66
+static llvm::cl::opt<unsigned> printElementsAttrWithHexIfLarger(
+ "mlir-print-elementsattrs-with-hex-if-larger",
----------------
Can we make it an int and use -1 to disable?
================
Comment at: mlir/lib/IR/AsmPrinter.cpp:70
+ "more elements than the given upper limit"),
+ llvm::cl::init(10000));
+
----------------
I'd lower this to 100 or 500 or something like this: the idea of the threshold to me is that this is the number at which it is unlikely someone really care about reading individual value from the IR text file manually (and they can just round-trip with a higher threshold to get them)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74922/new/
https://reviews.llvm.org/D74922
More information about the llvm-commits
mailing list