diff --git a/compiler/include/concretelang/Support/JitLambdaSupport.h b/compiler/include/concretelang/Support/JitLambdaSupport.h index 7e9be73ae..397e74813 100644 --- a/compiler/include/concretelang/Support/JitLambdaSupport.h +++ b/compiler/include/concretelang/Support/JitLambdaSupport.h @@ -32,10 +32,7 @@ class JitLambdaSupport : public LambdaSupport { public: - JitLambdaSupport( - llvm::Optional runtimeLibPath = llvm::None, - llvm::function_ref llvmOptPipeline = - mlir::makeOptimizingTransformer(3, 0, nullptr)); + JitLambdaSupport(llvm::Optional runtimeLibPath = llvm::None); llvm::Expected> compile(llvm::SourceMgr &program, CompilationOptions options) override; diff --git a/compiler/lib/Support/JitLambdaSupport.cpp b/compiler/lib/Support/JitLambdaSupport.cpp index 701d12c5d..a07519732 100644 --- a/compiler/lib/Support/JitLambdaSupport.cpp +++ b/compiler/lib/Support/JitLambdaSupport.cpp @@ -11,20 +11,17 @@ namespace mlir { namespace concretelang { JitLambdaSupport::JitLambdaSupport( - llvm::Optional runtimeLibPath, - llvm::function_ref llvmOptPipeline) - : runtimeLibPath(runtimeLibPath), llvmOptPipeline(llvmOptPipeline) {} + llvm::Optional runtimeLibPath) + : runtimeLibPath(runtimeLibPath) {} llvm::Expected> JitLambdaSupport::compile(llvm::SourceMgr &program, CompilationOptions options) { - // Setup the compiler engine auto context = std::make_shared(); concretelang::CompilerEngine engine(context); engine.setCompilationOptions(options); - // Compile to LLVM Dialect auto compilationResult = engine.compile(program, CompilerEngine::Target::LLVM_IR); @@ -36,16 +33,14 @@ JitLambdaSupport::compile(llvm::SourceMgr &program, if (!options.clientParametersFuncName.hasValue()) { return StreamStringError("Need to have a funcname to JIT compile"); } - // Compile from LLVM Dialect to JITLambda auto mlirModule = compilationResult.get().mlirModuleRef->get(); auto lambda = concretelang::JITLambda::create( - *options.clientParametersFuncName, mlirModule, llvmOptPipeline, - runtimeLibPath); + *options.clientParametersFuncName, mlirModule, + mlir::makeOptimizingTransformer(3, 0, nullptr), runtimeLibPath); if (auto err = lambda.takeError()) { return std::move(err); } - if (!compilationResult.get().clientParameters.hasValue()) { // i.e. that should not occurs return StreamStringError("No client parameters has been generated");