[PATCH] D77787: [MLIR] Introduce a trait that defines a new scope for auto allocation
River Riddle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 9 11:06:42 PDT 2020
rriddle added inline comments.
================
Comment at: mlir/include/mlir/IR/OpDefinition.h:1039
+ static LogicalResult verifyTrait(Operation *op) {
+ if (op->getNumRegions() == 0)
+ return op->emitOpError("is expected to have regions");
----------------
bondhugula wrote:
> rriddle wrote:
> > What happens if the operation has a variadic number of regions?
> That should be fine. The allocations of each are still to be freed when control transfers from that respective region to the op.
Can we remove this check then? Otherwise, specific forms of operations would be legal and others not.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77787/new/
https://reviews.llvm.org/D77787
More information about the llvm-commits
mailing list