|
12 | 12 | #include "mlir/Dialect/ControlFlow/IR/ControlFlow.h" |
13 | 13 | #include "mlir/Dialect/Func/IR/FuncOps.h" |
14 | 14 | #include "mlir/Dialect/MemRef/IR/MemRef.h" |
| 15 | +#include "mlir/IR/AsmState.h" |
15 | 16 | #include "mlir/IR/BuiltinOps.h" |
16 | 17 | #include "mlir/IR/Diagnostics.h" |
17 | 18 | #include "mlir/IR/MLIRContext.h" |
@@ -44,7 +45,9 @@ static llvm::cl::opt<std::string> |
44 | 45 |
|
45 | 46 | int main(int argc, char **argv) { |
46 | 47 | llvm::InitLLVM y(argc, argv); |
| 48 | + warpforth::registerConversionPasses(); |
47 | 49 | registerMLIRContextCLOptions(); |
| 50 | + registerAsmPrinterCLOptions(); |
48 | 51 | registerPassManagerCLOptions(); |
49 | 52 | llvm::cl::ParseCommandLineOptions(argc, argv, |
50 | 53 | "WarpForth compiler: Forth to PTX\n"); |
@@ -88,7 +91,8 @@ int main(int argc, char **argv) { |
88 | 91 |
|
89 | 92 | // Run the compilation pipeline |
90 | 93 | PassManager pm(&context); |
91 | | - (void)applyPassManagerCLOptions(pm); |
| 94 | + if (failed(applyPassManagerCLOptions(pm))) |
| 95 | + return 1; |
92 | 96 | warpforth::buildWarpForthPipeline(pm); |
93 | 97 | if (failed(pm.run(*module))) { |
94 | 98 | llvm::errs() << "error: compilation pipeline failed\n"; |
|
0 commit comments