[Mlir-commits] [mlir] [mlir][tosa] Fix check for isolated regions in `tosa.cond_if` (PR #143772)
Luke Hutton
llvmlistbot at llvm.org
Fri Jul 18 07:37:33 PDT 2025
================
@@ -1193,32 +1193,55 @@ bool checkErrorIfPad(Operation *op) {
return true;
}
-// Returns true if the operation takes no input operands, excluding attributes.
-static bool isNullaryOperation(Operation *op) {
- if (isa<tosa::ConstOp>(op) || isa<tosa::ConstShapeOp>(op) ||
- isa<tosa::YieldOp>(op) || isa<tosa::VariableOp>(op))
- return true;
- return false;
+static bool isOpIsolatedFromAbove(Operation *op, Region *region) {
----------------
lhutton1 wrote:
`op` is an operator in the specified `region` that we want to check the operands of to make sure they're defined within `region`. Agree this could be clearer, so I've updated the function name, hopefully this looks better?
https://github.com/llvm/llvm-project/pull/143772
More information about the Mlir-commits
mailing list