Includes a lowering for tosa.const, tosa.if, and tosa.while to Standard/SCF dialects. TosaToStandard is
used for constant lowerings and TosaToSCF handles the if/while ops.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Conversion/TosaToStandard/TosaToStandardPass.cpp | ||
---|---|---|
49 | it feels like these could be in TosaToSCF and convert to scf.if/scf.while. Would be easier to write them as patterns too. |
mlir/lib/Conversion/TosaToStandard/TosaToStandard.cpp | ||
---|---|---|
78 | Remove all of the mlir:: in this commit. |
mlir/lib/Conversion/TosaToStandard/TosaToStandardPass.cpp | ||
---|---|---|
49 | +1 |
mlir/include/mlir/Conversion/TosaToStandard/TosaToStandard.h | ||
---|---|---|
23 | decl not needed? | |
mlir/lib/Conversion/TosaToStandard/TosaToStandard.cpp | ||
2 | nit: formatting | |
mlir/lib/Conversion/TosaToStandard/TosaToStandardPass.cpp | ||
31 | specify in td file. | |
38 | you should only need ConstantOp legal. | |
45 | use partial conversion so you don't need markUnknownOpDynamicallyLegal | |
mlir/test/Conversion/TosaToSCF/tosa-to-scf.mlir | ||
39 | nit: indent |
mlir/lib/Conversion/TosaToSCF/TosaToSCF.cpp | ||
---|---|---|
26 | Functions should be marked static and at the top-level, only classes should be in anonymous namespaces. | |
30 | nit: Spell out auto here. | |
31 | Remove trivial braces. | |
42 | This seems sketchy, how does this work with rollbacks? Why not rewriter.erase? | |
66 | Same comment here. | |
mlir/lib/Conversion/TosaToSCF/TosaToSCFPass.cpp | ||
29 | Why does this need to be a FuncOp pass? | |
mlir/lib/Conversion/TosaToStandard/TosaToStandardPass.cpp | ||
35 | Same comment, why is this a FuncOp pass? |
decl not needed?