[Mlir-commits] [mlir] dfee17d - Fix MLIR properties generic printing to honor eliding large attributes
Mehdi Amini
llvmlistbot at llvm.org
Tue May 2 23:42:28 PDT 2023
Author: Mehdi Amini
Date: 2023-05-02T23:42:16-07:00
New Revision: dfee17d31cd079645a99e981fa4ac0104d302bc6
URL: https://github.com/llvm/llvm-project/commit/dfee17d31cd079645a99e981fa4ac0104d302bc6
DIFF: https://github.com/llvm/llvm-project/commit/dfee17d31cd079645a99e981fa4ac0104d302bc6.diff
LOG: Fix MLIR properties generic printing to honor eliding large attributes
There was a discrepancy where the flag was honored when passed through the
command line, but not when passed through the API, which was leading to a
python test failing.
Added:
Modified:
mlir/lib/IR/AsmPrinter.cpp
Removed:
################################################################################
diff --git a/mlir/lib/IR/AsmPrinter.cpp b/mlir/lib/IR/AsmPrinter.cpp
index ceb4fd814a1e2..3c525a6e76351 100644
--- a/mlir/lib/IR/AsmPrinter.cpp
+++ b/mlir/lib/IR/AsmPrinter.cpp
@@ -3355,8 +3355,11 @@ void OperationPrinter::printGenericOp(Operation *op, bool printOpName) {
}
// Print the properties.
- if (Attribute prop = op->getPropertiesAsAttribute())
- os << " <" << prop << '>';
+ if (Attribute prop = op->getPropertiesAsAttribute()) {
+ os << " <";
+ Impl::printAttribute(prop);
+ os << '>';
+ }
// Print regions.
if (op->getNumRegions() != 0) {
More information about the Mlir-commits
mailing list