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
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Conversion/TosaToStandard/TosaToStandardPass.cpp | ||
---|---|---|
48 ↗ | (On Diff #326164) | 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 ↗ | (On Diff #326164) | +1 |
mlir/include/mlir/Conversion/TosaToStandard/TosaToStandard.h | ||
---|---|---|
23 ↗ | (On Diff #326459) | decl not needed? |
mlir/lib/Conversion/TosaToStandard/TosaToStandard.cpp | ||
2 | nit: formatting | |
mlir/lib/Conversion/TosaToStandard/TosaToStandardPass.cpp | ||
31 ↗ | (On Diff #326459) | specify in td file. |
38 ↗ | (On Diff #326459) | you should only need ConstantOp legal. |
45 ↗ | (On Diff #326459) | 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 | ||
35 ↗ | (On Diff #326459) | Same comment, why is this a FuncOp pass? |
nit: formatting