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 | ||
---|---|---|
48 | 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 | ||
---|---|---|
77 | Remove all of the mlir:: in this commit. |
mlir/lib/Conversion/TosaToStandard/TosaToStandardPass.cpp | ||
---|---|---|
48 | +1 |
mlir/include/mlir/Conversion/TosaToStandard/TosaToStandard.h | ||
---|---|---|
24 | decl not needed? | |
mlir/lib/Conversion/TosaToStandard/TosaToStandard.cpp | ||
3 | nit: formatting | |
mlir/lib/Conversion/TosaToStandard/TosaToStandardPass.cpp | ||
32 | specify in td file. | |
39 | you should only need ConstantOp legal. | |
46 | use partial conversion so you don't need markUnknownOpDynamicallyLegal | |
mlir/test/Conversion/TosaToSCF/tosa-to-scf.mlir | ||
39 ↗ | (On Diff #326459) | nit: indent |
mlir/lib/Conversion/TosaToSCF/TosaToSCF.cpp | ||
---|---|---|
26 ↗ | (On Diff #326459) | Functions should be marked static and at the top-level, only classes should be in anonymous namespaces. |
30 ↗ | (On Diff #326459) | nit: Spell out auto here. |
31 ↗ | (On Diff #326459) | Remove trivial braces. |
42 ↗ | (On Diff #326459) | This seems sketchy, how does this work with rollbacks? Why not rewriter.erase? |
66 ↗ | (On Diff #326459) | Same comment here. |
mlir/lib/Conversion/TosaToSCF/TosaToSCFPass.cpp | ||
29 ↗ | (On Diff #326459) | Why does this need to be a FuncOp pass? |
mlir/lib/Conversion/TosaToStandard/TosaToStandardPass.cpp | ||
36 | Same comment, why is this a FuncOp pass? |
decl not needed?