Skip to content

Commit a70f2eb

Browse files
committed
[MLIR][Shape] Merge shape to std/scf lowerings.
Merge the two lowering passes because they are not useful by themselves. The new pass lowers to `std` and `scf` is considered an auxiliary dialect. See also https://llvm.discourse.group/t/conversions-with-multiple-target-dialects/1541/12 Differential Revision: https://reviews.llvm.org/D86779
1 parent 288c582 commit a70f2eb

File tree

9 files changed

+497
-634
lines changed

9 files changed

+497
-634
lines changed

mlir/include/mlir/Conversion/Passes.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#include "mlir/Conversion/SCFToGPU/SCFToGPUPass.h"
2424
#include "mlir/Conversion/SCFToStandard/SCFToStandard.h"
2525
#include "mlir/Conversion/SPIRVToLLVM/ConvertSPIRVToLLVMPass.h"
26-
#include "mlir/Conversion/ShapeToSCF/ShapeToSCF.h"
2726
#include "mlir/Conversion/ShapeToStandard/ShapeToStandard.h"
2827
#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h"
2928
#include "mlir/Conversion/StandardToSPIRV/ConvertStandardToSPIRVPass.h"

mlir/include/mlir/Conversion/Passes.td

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -239,17 +239,7 @@ def ConvertShapeToStandard : Pass<"convert-shape-to-std", "ModuleOp"> {
239239
let summary = "Convert operations from the shape dialect into the standard "
240240
"dialect";
241241
let constructor = "mlir::createConvertShapeToStandardPass()";
242-
let dependentDialects = ["StandardOpsDialect"];
243-
}
244-
245-
//===----------------------------------------------------------------------===//
246-
// ShapeToSCF
247-
//===----------------------------------------------------------------------===//
248-
249-
def ConvertShapeToSCF : FunctionPass<"convert-shape-to-scf"> {
250-
let summary = "Convert operations from the shape dialect to the SCF dialect";
251-
let constructor = "mlir::createConvertShapeToSCFPass()";
252-
let dependentDialects = ["scf::SCFDialect"];
242+
let dependentDialects = ["StandardOpsDialect", "scf::SCFDialect"];
253243
}
254244

255245
//===----------------------------------------------------------------------===//

mlir/include/mlir/Conversion/ShapeToSCF/ShapeToSCF.h

Lines changed: 0 additions & 27 deletions
This file was deleted.

mlir/lib/Conversion/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ add_subdirectory(OpenMPToLLVM)
1212
add_subdirectory(SCFToGPU)
1313
add_subdirectory(SCFToSPIRV)
1414
add_subdirectory(SCFToStandard)
15-
add_subdirectory(ShapeToSCF)
1615
add_subdirectory(ShapeToStandard)
1716
add_subdirectory(SPIRVToLLVM)
1817
add_subdirectory(StandardToLLVM)

mlir/lib/Conversion/ShapeToSCF/CMakeLists.txt

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)