enhance(compiler/lowlfhe): Give the runtime context as function argument instead of a global variable (close #195)

This commit is contained in:
Quentin Bourgerie
2021-11-26 18:02:12 +01:00
parent 99fe188e66
commit fb58dcc59d
14 changed files with 201 additions and 164 deletions

View File

@@ -140,7 +140,8 @@ lowerLowLFHEToStd(mlir::MLIRContext &context, mlir::ModuleOp &module,
std::function<bool(mlir::Pass *)> enablePass) {
mlir::PassManager pm(&context);
pipelinePrinting("LowLFHEToStd", pm, context);
pm.addPass(mlir::zamalang::createConvertLowLFHEToConcreteCAPIPass());
addPotentiallyNestedPass(
pm, mlir::zamalang::createConvertLowLFHEToConcreteCAPIPass(), enablePass);
return pm.run(module.getOperation());
}