File tree Expand file tree Collapse file tree 4 files changed +1
-9
lines changed
nautilus/src/nautilus/compiler/backends/mlir Expand file tree Collapse file tree 4 files changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -20,9 +20,7 @@ if (ENABLE_MLIR_BACKEND)
20
20
MLIRExecutionEngine
21
21
MLIRFuncAllExtensions
22
22
# Dialects
23
- MLIRSCFDialect
24
23
MLIRFuncToLLVM
25
- MLIRSCFToControlFlow
26
24
)
27
25
28
26
add_source_files (nautilus
Original file line number Diff line number Diff line change 10
10
#include < mlir/Dialect/Func/IR/FuncOps.h>
11
11
#include < mlir/Dialect/LLVMIR/LLVMDialect.h>
12
12
#include < mlir/Dialect/LLVMIR/LLVMTypes.h>
13
- #include < mlir/Dialect/SCF/IR/SCF.h>
14
13
#include < mlir/IR/Attributes.h>
15
14
#include < mlir/IR/Builders.h>
16
15
#include < mlir/IR/BuiltinAttributes.h>
@@ -212,7 +211,6 @@ MLIRLoweringProvider::MLIRLoweringProvider(mlir::MLIRContext& context) : context
212
211
builder->getContext ()->loadDialect <mlir::cf::ControlFlowDialect>();
213
212
builder->getContext ()->loadDialect <mlir::LLVM::LLVMDialect>();
214
213
builder->getContext ()->loadDialect <mlir::func::FuncDialect>();
215
- builder->getContext ()->loadDialect <mlir::scf::SCFDialect>();
216
214
this ->theModule = mlir::ModuleOp::create (getNameLoc (" module" ));
217
215
// Store InsertPoint for inserting globals such as Strings or TupleBuffers.
218
216
globalInsertPoint = new mlir::RewriterBase::InsertPoint (theModule.getBody (), theModule.begin ());
Original file line number Diff line number Diff line change 4
4
#include " nautilus/exceptions/NotImplementedException.hpp"
5
5
#include < mlir/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.h>
6
6
#include < mlir/Conversion/FuncToLLVM/ConvertFuncToLLVMPass.h>
7
- #include < mlir/Conversion/SCFToControlFlow/SCFToControlFlow.h>
8
7
#include < mlir/ExecutionEngine/OptUtils.h>
9
8
#include < mlir/Pass/PassManager.h>
10
9
#include < mlir/Transforms/Passes.h>
@@ -25,8 +24,6 @@ std::unique_ptr<mlir::Pass> getMLIRLoweringPass(MLIRPassManager::LoweringPass lo
25
24
switch (loweringPass) {
26
25
case MLIRPassManager::LoweringPass::LLVM:
27
26
return mlir::createConvertControlFlowToLLVMPass ();
28
- case MLIRPassManager::LoweringPass::SCF:
29
- return mlir::createConvertSCFToCFPass ();
30
27
}
31
28
throw NotImplementedException (" pass is not supported" );
32
29
}
@@ -64,7 +61,6 @@ int MLIRPassManager::lowerAndOptimizeMLIRModule(mlir::OwningOpRef<mlir::ModuleOp
64
61
passManager.addPass (getMLIRLoweringPass (loweringPass));
65
62
}
66
63
} else {
67
- passManager.addPass (mlir::createConvertSCFToCFPass ());
68
64
passManager.addPass (mlir::createConvertFuncToLLVMPass ());
69
65
passManager.addPass (mlir::createConvertControlFlowToLLVMPass ());
70
66
}
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ namespace nautilus::compiler::mlir {
9
9
// and applies configured lowering & optimization passes to it.
10
10
class MLIRPassManager {
11
11
public:
12
- enum class LoweringPass : uint8_t { SCF, LLVM };
12
+ enum class LoweringPass : uint8_t { LLVM };
13
13
enum class OptimizationPass : uint8_t { Inline };
14
14
15
15
MLIRPassManager (); // Disable default constructor
You can’t perform that action at this time.
0 commit comments