This patch introduce the fir-opt tool. Similar to mlir-opt for FIR.
It will be used in following patches to test fir opt and round-trip.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thanks, I wrote exactly this locally before seeing this patch! :)
Can you also update test/Fir/fir-ops.fir and test/Fir/fir-types.fir to use this? I had changed the run line this way:
// Parse operations and check that we can reparse what we print. // RUN: fir-opt %s | fir-opt | FileCheck %s
flang/tools/fir-opt/CMakeLists.txt | ||
---|---|---|
22 | This list of dependency should be pruned. These two are obvious: FIROptimizer MLIROptLib None of the others are. | |
flang/tools/fir-opt/fir-opt.cpp | ||
24 | Can you replace the two lines above with fir::registerFIRDialects(registry); ? | |
26 | (nit: missing newline) |
flang/tools/fir-opt/CMakeLists.txt | ||
---|---|---|
22 | LG, please separate ${dialect_libs} and MLIRAffineToStandard after a line TODO: these should be transitive dependencies from a target providing "registerFIRPasses()" |
flang/test/Fir/fir-types.fir | ||
---|---|---|
2–3 | Nit: types ;) |
flang/test/Fir/fir-types.fir | ||
---|---|---|
2–3 | My bad :) |
Nit: types ;)