[Mlir-commits] [mlir] 2469cdd - [mlir] remove RegionBranchOpInterface from linalg ops

Alex Zinenko llvmlistbot at llvm.org
Fri Jul 21 01:18:47 PDT 2023


Author: Alex Zinenko
Date: 2023-07-21T08:18:41Z
New Revision: 2469cdd156c5290c087116a2b5eaf99f9ef12f09

URL: https://github.com/llvm/llvm-project/commit/2469cdd156c5290c087116a2b5eaf99f9ef12f09
DIFF: https://github.com/llvm/llvm-project/commit/2469cdd156c5290c087116a2b5eaf99f9ef12f09.diff

LOG: [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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td b/mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
index dd2a943184a3ef..c8d579949dc4eb 100644
--- a/mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
+++ b/mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
@@ -16,7 +16,6 @@
 
 include "mlir/Dialect/Linalg/IR/LinalgBase.td"
 include "mlir/Dialect/Linalg/IR/LinalgInterfaces.td"
-include "mlir/Interfaces/ControlFlowInterfaces.td"
 include "mlir/Interfaces/DestinationStyleOpInterface.td"
 include "mlir/Interfaces/InferTypeOpInterface.td"
 include "mlir/Interfaces/SideEffectInterfaces.td"
@@ -32,7 +31,6 @@ class LinalgStructuredBase_Op<string mnemonic, list<Trait> props>
        DeclareOpInterfaceMethods<MemoryEffectsOpInterface>,
        DestinationStyleOpInterface,
        LinalgStructuredInterface,
-       RegionBranchOpInterface,
        ReifyRankedShapedTypeOpInterface], props)> {
   code structuredOpsBaseDecls = [{
     // Return whether the op accesses the iteration indices.
@@ -45,13 +43,6 @@ class LinalgStructuredBase_Op<string mnemonic, list<Trait> props>
       return llvm::cast<LinalgOp>(getOperation()).reifyResultShapes(b,
           reifiedReturnShapes);
     }
-
-    void getSuccessorRegions(
-        std::optional<unsigned> index, ArrayRef<Attribute> operands,
-        SmallVectorImpl<RegionSuccessor> &regions) {
-      // Op has a region, but conceptually the control flow does not enter the
-      // region.
-    }
   }];
 }
 


        


More information about the Mlir-commits mailing list