@@ -1548,58 +1548,6 @@ void printWsloop(OpAsmPrinter &p, Operation *op, Region ®ion,
15481548 p.printRegion (region, /* printEntryBlockArgs=*/ false );
15491549}
15501550
1551- // / loop-control ::= `(` ssa-id-list `)` `:` type `=` loop-bounds
1552- // / loop-bounds := `(` ssa-id-list `)` to `(` ssa-id-list `)` inclusive? steps
1553- // / steps := `step` `(`ssa-id-list`)`
1554- ParseResult
1555- parseLoopControl (OpAsmParser &parser, Region ®ion,
1556- SmallVectorImpl<OpAsmParser::UnresolvedOperand> &lowerBound,
1557- SmallVectorImpl<OpAsmParser::UnresolvedOperand> &upperBound,
1558- SmallVectorImpl<OpAsmParser::UnresolvedOperand> &steps,
1559- SmallVectorImpl<Type> &loopVarTypes, UnitAttr &inclusive) {
1560- // Parse an opening `(` followed by induction variables followed by `)`
1561- SmallVector<OpAsmParser::Argument> ivs;
1562- Type loopVarType;
1563- if (parser.parseArgumentList (ivs, OpAsmParser::Delimiter::Paren) ||
1564- parser.parseColonType (loopVarType) ||
1565- // Parse loop bounds.
1566- parser.parseEqual () ||
1567- parser.parseOperandList (lowerBound, ivs.size (),
1568- OpAsmParser::Delimiter::Paren) ||
1569- parser.parseKeyword (" to" ) ||
1570- parser.parseOperandList (upperBound, ivs.size (),
1571- OpAsmParser::Delimiter::Paren))
1572- return failure ();
1573-
1574- if (succeeded (parser.parseOptionalKeyword (" inclusive" )))
1575- inclusive = UnitAttr::get (parser.getBuilder ().getContext ());
1576-
1577- // Parse step values.
1578- if (parser.parseKeyword (" step" ) ||
1579- parser.parseOperandList (steps, ivs.size (), OpAsmParser::Delimiter::Paren))
1580- return failure ();
1581-
1582- // Now parse the body.
1583- loopVarTypes = SmallVector<Type>(ivs.size (), loopVarType);
1584- for (auto &iv : ivs)
1585- iv.type = loopVarType;
1586-
1587- return parser.parseRegion (region, ivs);
1588- }
1589-
1590- void printLoopControl (OpAsmPrinter &p, Operation *op, Region ®ion,
1591- ValueRange lowerBound, ValueRange upperBound,
1592- ValueRange steps, TypeRange loopVarTypes,
1593- UnitAttr inclusive) {
1594- auto args = region.front ().getArguments ();
1595- p << " (" << args << " ) : " << args[0 ].getType () << " = (" << lowerBound
1596- << " ) to (" << upperBound << " ) " ;
1597- if (inclusive)
1598- p << " inclusive " ;
1599- p << " step (" << steps << " ) " ;
1600- p.printRegion (region, /* printEntryBlockArgs=*/ false );
1601- }
1602-
16031551// ===----------------------------------------------------------------------===//
16041552// Simd construct [2.9.3.1]
16051553// ===----------------------------------------------------------------------===//
0 commit comments