File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -141,13 +141,12 @@ def Nbdl_GetOp : Nbdl_Op<"get", []> {
141141 let results = (outs Nbdl_Type:$result);
142142}
143143
144- def VisitOp : Nbdl_Op<"visit", [Terminator]> {
144+ def Nbdl_VisitOp : Nbdl_Op<"visit", [Terminator]> {
145145 let description = [{
146- Visit a single result with a function object.
147- VisitOp is a simplification of MatchOp for leaf nodes.
146+ Visit matched results with a function object.
148147 }];
149148
150- let arguments = (ins Nbdl_Type:$fn, Nbdl_Type:$arg );
149+ let arguments = (ins Nbdl_Type:$fn, Variadic< Nbdl_Type>:$args );
151150 let results = (outs);
152151}
153152
Original file line number Diff line number Diff line change @@ -351,7 +351,10 @@ class FuncWriter : public NbdlWriter<FuncWriter> {
351351 void Visit (VisitOp Op) {
352352 WriteForwardedExpr (Op.getFn ());
353353 OS << ' (' ;
354- WriteForwardedExpr (Op.getArg ());
354+ llvm::interleave (Op.getArgs (), OS,
355+ [&](mlir::Value V) {
356+ WriteForwardedExpr (V);
357+ }, " ,\n " );
355358 OS << " );\n " ;
356359 }
357360
You can’t perform that action at this time.
0 commit comments