Skip to content

Commit 16b0be6

Browse files
authored
[MLIR][OpenMP] NFC: Remove LoopControl parsing/printing code (#88909)
This patch removes the LoopControl parsing/printing functions that are no longer used after transitioning `omp.simdloop` and `omp.taskloop` into loop wrapper operations.
1 parent 3eb0ba3 commit 16b0be6

File tree

1 file changed

+0
-52
lines changed

1 file changed

+0
-52
lines changed

mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1548,58 +1548,6 @@ void printWsloop(OpAsmPrinter &p, Operation *op, Region &region,
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 &region,
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 &region,
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

Comments
 (0)