[Mlir-commits] [mlir] [mlir][LLVM] Add operand bundle support (PR #108933)
Markus Böck
llvmlistbot at llvm.org
Mon Sep 23 09:31:40 PDT 2024
================
@@ -1100,6 +1186,27 @@ LogicalResult verifyCallOpVarCalleeType(OpTy callOp) {
return success();
}
+template <typename OpType>
+static LogicalResult verifyOperandBundles(OpType &op) {
+ OperandRangeRange opBundleOperands = op.getOpBundleOperands();
+ std::optional<ArrayRef<std::string>> opBundleTags = op.getOpBundleTags();
+
+ if (!opBundleTags.has_value()) {
+ if (!opBundleOperands.empty())
+ return op.emitError("expected operand bundle tags");
+ return success();
+ }
+
+ if (opBundleTags->size() != opBundleOperands.size())
----------------
zero9178 wrote:
```suggestion
ArrayRef<std::string> opBundleTags = op.getOpBundleTags();
if (opBundleTags.size() != opBundleOperands.size())
```
https://github.com/llvm/llvm-project/pull/108933
More information about the Mlir-commits
mailing list