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 | ||
|---|---|---|
| 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 | ||
| 40 | nit: indent | |
| mlir/lib/Conversion/TosaToSCF/TosaToSCF.cpp | ||
|---|---|---|
| 27 | Functions should be marked static and at the top-level, only classes should be in anonymous namespaces. | |
| 31 | nit: Spell out auto here. | |
| 32 | Remove trivial braces. | |
| 43 | This seems sketchy, how does this work with rollbacks? Why not rewriter.erase? | |
| 67 | Same comment here. | |
| mlir/lib/Conversion/TosaToSCF/TosaToSCFPass.cpp | ||
| 30 | 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?