FuncOp is being moved out of the builtin dialect, and defining a custom
toy operation showcases various aspects of defining function-like operation
(e.g. inlining, passes, etc.).
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
(some comments from the parent revision apply here but I don't repeat them)
mlir/examples/toy/Ch3/mlir/MLIRGen.cpp | ||
---|---|---|
122 | Interesting, the comment didn't match the implementation: the function wasn't added to the module... | |
mlir/examples/toy/Ch7/mlir/LowerToAffineLoops.cpp | ||
230 | Is this necessary to get out of toy::FuncOp here? |
mlir/examples/toy/Ch3/mlir/MLIRGen.cpp | ||
---|---|---|
122 | Yeah... I assume this was something from very early on that didn't get adapted as the contents of the function changed. Interestingly enough, the comment is now actually accurate. | |
mlir/examples/toy/Ch7/mlir/LowerToAffineLoops.cpp | ||
230 | I adapted here because we already lower ReturnOp here, which needs to be lowered at the same time. We also use some FuncOp specific affine optimization passes right afterwards, so we would need to drop out of toy::FuncOp around this point anyways. |
Interesting, the comment didn't match the implementation: the function wasn't added to the module...