[Mlir-commits] [mlir] [mlir][LLVM] Add operand bundle support (PR #108933)
Tobias Gysi
llvmlistbot at llvm.org
Mon Sep 23 09:56:27 PDT 2024
================
@@ -1285,14 +1400,53 @@ static ParseResult parseOptionalCallFuncPtr(
return success();
}
+static ParseResult resolveOpBundleOperands(
+ OpAsmParser &parser, SMLoc loc, OperationState &state,
+ ArrayRef<SmallVector<OpAsmParser::UnresolvedOperand>> opBundleOperands,
+ ArrayRef<SmallVector<Type>> opBundleOperandTypes,
+ StringAttr opBundleSizesAttrName) {
+ assert(opBundleOperands.size() == opBundleOperandTypes.size() &&
+ "operand bundle operand groups and type groups should match");
+
+ unsigned opBundleIndex = 0;
+ for (const auto &[operands, types] :
+ llvm::zip(opBundleOperands, opBundleOperandTypes)) {
----------------
gysit wrote:
```suggestion
llvm::zip_equal(opBundleOperands, opBundleOperandTypes)) {
```
nit: zip_equal should assert if the lengths don't match so you may use it to replace the assert above.
https://github.com/llvm/llvm-project/pull/108933
More information about the Mlir-commits
mailing list