- The API is a bit more verbose than I feel like it needs to be. In a follow-up I'd like to abbreviate some things and look in to creating aliases for common accessors.
- There is a lingering lifetime hazard between the module and newly added operations. We have the facilities now to solve for this but I will do that in a follow-up.
- We may need to craft a more limited API for safely referencing successors when creating operations. We need more facilities to really prove that out and should defer for now.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Bindings/Python/IRModules.cpp | ||
---|---|---|
1306 | I switched it and maybe it is marginally better. This is kind of the worst-case scenario: lots of args that need to line up, complicated implementation. It's a burden either way. | |
1357 | I started down that path and then just opted for simplicity since this is the one and only place we are doing this kind of juggling (mental overhead of a cleaner and releasing properly to avoid double free can be bug prone too). |
https://reviews.llvm.org/D88148