enhance(compiler): Add options for verbose passes

This commit is contained in:
Quentin Bourgerie
2021-08-25 17:53:42 +02:00
parent 1077c9167c
commit d03adbd7dc
3 changed files with 62 additions and 32 deletions

View File

@@ -175,10 +175,13 @@ processInputBuffer(mlir::MLIRContext &context,
};
// Lower to MLIR Stds Dialects and compute the constraint on the FHE Circuit.
mlir::zamalang::CompilerTools::LowerOptions lowerOptions;
lowerOptions.enablePass = enablePass;
lowerOptions.verbose = cmdline::verbose;
mlir::zamalang::V0FHEContext fheContext;
LOG_VERBOSE("### Lower from HLFHE to MLIR standards \n");
if (mlir::zamalang::CompilerTools::lowerHLFHEToMlirStdsDialect(
context, *module, fheContext, enablePass)
context, *module, fheContext, lowerOptions)
.failed()) {
return mlir::failure();
}
@@ -217,9 +220,8 @@ processInputBuffer(mlir::MLIRContext &context,
}
// Lower to MLIR LLVM Dialect
LOG_VERBOSE("### Lower from MLIR standards to LLVM\n");
if (mlir::zamalang::CompilerTools::lowerMlirStdsDialectToMlirLLVMDialect(
context, *module, enablePass)
context, *module, lowerOptions)
.failed()) {
return mlir::failure();
}