-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core: add replacement arg_values to inline_block_before #2061
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #2061 +/- ##
=======================================
Coverage 90.04% 90.04%
=======================================
Files 292 292
Lines 36436 36498 +62
Branches 5406 5415 +9
=======================================
+ Hits 32807 32865 +58
+ Misses 2858 2857 -1
- Partials 771 776 +5 ☔ View full report in Codecov by Sentry. |
Is this ready? I see commented code and TODOs. Thanks |
This is ready, there's just behaviour that we can currently not replicate due to lack of successor/predecessor accessors on Blocks in xDSL. I can add more comments to the commented code? I'll add the link to MLIR implementation. |
OK, I'll have a look then, is it worth tracking the TODOs as issues? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, but I have a question about it.
Why do we want to check for the correctness of successors after inlining?
If we do multiple rewrites at once, I would expect to only verify the correctness of successors at the end of the sequence of rewrites?
Is it what MLIR does?
Yeah that's fully lifted from the MLIR code base. I'm not 100% sure what all the reasons behind it are, but it feels reasonable for me to leave the commented stubs in so that we have something to go from when we hit a bug in a rewrite that leverages this. |
Slightly modifies the semantics of inlining, bringing it in line with MLIR's behaviour, in my understanding. Currently, xDSL empties the block when inlining it to a different block, but does not erase it. With this PR, this behaviour is changed to erasing the block, potentially leaving an empty region.