File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -194,16 +194,17 @@ class PrintOpPass : public impl::ViewOpGraphBase<PrintOpPass> {
194
194
195
195
// Always emit splat attributes.
196
196
if (isa<SplatElementsAttr>(attr)) {
197
- attr.print (os);
197
+ os << escapeLabelString (
198
+ strFromOs ([&](raw_ostream &os) { attr.print (os); }));
198
199
return ;
199
200
}
200
201
201
202
// Elide "big" elements attributes.
202
203
auto elements = dyn_cast<ElementsAttr>(attr);
203
204
if (elements && elements.getNumElements () > largeAttrLimit) {
204
205
os << std::string (elements.getShapedType ().getRank (), ' [' ) << " ..."
205
- << std::string (elements.getShapedType ().getRank (), ' ]' ) << " : "
206
- << elements.getType ();
206
+ << std::string (elements.getShapedType ().getRank (), ' ]' ) << " : " ;
207
+ emitMlirType (os, elements.getType () );
207
208
return ;
208
209
}
209
210
@@ -313,7 +314,7 @@ class PrintOpPass : public impl::ViewOpGraphBase<PrintOpPass> {
313
314
if (printAttrs) {
314
315
os << " \\ l" ;
315
316
for (const NamedAttribute &attr : op->getAttrs ()) {
316
- os << attr.getName ().getValue () << " : " ;
317
+ os << escapeLabelString ( attr.getName ().getValue (). str () ) << " : " ;
317
318
emitMlirAttr (os, attr.getValue ());
318
319
os << " \\ l" ;
319
320
}
You can’t perform that action at this time.
0 commit comments