Skip to content

Commit 2469cdd

Browse files
committed
[mlir] remove RegionBranchOpInterface from linalg ops
Linalg structure ops do not implement control flow in the way expected by RegionBranchOpInterface, and the interface implementation isn't actually used anywhere. The presence of this interface without correct implementation is confusing for, e.g., dataflow analyses. Reviewed By: springerm Differential Revision: https://reviews.llvm.org/D155841
1 parent 174300a commit 2469cdd

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
include "mlir/Dialect/Linalg/IR/LinalgBase.td"
1818
include "mlir/Dialect/Linalg/IR/LinalgInterfaces.td"
19-
include "mlir/Interfaces/ControlFlowInterfaces.td"
2019
include "mlir/Interfaces/DestinationStyleOpInterface.td"
2120
include "mlir/Interfaces/InferTypeOpInterface.td"
2221
include "mlir/Interfaces/SideEffectInterfaces.td"
@@ -32,7 +31,6 @@ class LinalgStructuredBase_Op<string mnemonic, list<Trait> props>
3231
DeclareOpInterfaceMethods<MemoryEffectsOpInterface>,
3332
DestinationStyleOpInterface,
3433
LinalgStructuredInterface,
35-
RegionBranchOpInterface,
3634
ReifyRankedShapedTypeOpInterface], props)> {
3735
code structuredOpsBaseDecls = [{
3836
// Return whether the op accesses the iteration indices.
@@ -45,13 +43,6 @@ class LinalgStructuredBase_Op<string mnemonic, list<Trait> props>
4543
return llvm::cast<LinalgOp>(getOperation()).reifyResultShapes(b,
4644
reifiedReturnShapes);
4745
}
48-
49-
void getSuccessorRegions(
50-
std::optional<unsigned> index, ArrayRef<Attribute> operands,
51-
SmallVectorImpl<RegionSuccessor> &regions) {
52-
// Op has a region, but conceptually the control flow does not enter the
53-
// region.
54-
}
5546
}];
5647
}
5748

0 commit comments

Comments
 (0)