User Details
- User Since
- Aug 23 2021, 3:45 AM (91 w, 6 d)
Jan 25 2023
Looks good to me--a much needed improvement! However, someone with a more recent knowledge of PDL should review as well.
Feb 3 2022
As I mentioned in the previous diff on this stack, instead of implementing a new op ChooseRange, you should generalize ForEach. Also, GetItem is a duplicate of Extract.
Jan 3 2022
Rebased.
Rebased.
Rebased off main.
Rebased.
Rebased.
Dec 22 2021
Check against impl directly
Dec 21 2021
Fix printing of null value in SSANameState::printValueID.
Implemented a custom walk to determine the liveness range of an operation.
Changed to 0-based indexing of the insertion order.
Incorporated review feedback.
Dec 20 2021
Dec 1 2021
Add operations to a block to facilitate automatic deletion.
Nov 29 2021
Review feedback.
It is a bit unusual to work with operations that aren't inserted in a block, I guess it works here...
Messed up a rebase, will submit a new diff.
Review feedback.
Nov 27 2021
I am not able to reproduce the leak on Apple clang version 12.0.5 (running on M1). Will try on a different machine tomorrow.
Nov 26 2021
@bondhugula I am not sure, but I built this with GCC 5.4 myself. The code compiled, and all the tests passed.
@mehdi_amini thanks for bringing this up; I will take a look.
Nov 25 2021
Rebased.
Rebased.
Rebased.
Minor cleanups.
Minor cleanup.
Added comment.
Switch from pdl_interp.get_value to pdl_interp.extract.
Rebased.
Implemented pdl_interp.extract.
Generalized pdl_interp.get_value to pdl_interp.extract
Nov 24 2021
Nov 22 2021
@rriddle I hope that my latest update addresses your concerns.
Rebased.
Use pdl_interp.get_value for upward traversal of value ranges.
Rebased.
Fixed the semantics of get_users for value range and implemented pdl_interp.get_value.
Fixed the comments.
Updated semantics of pdl_interp.get_users to return all users for a value range.
Added pdl_interp.get_value operation for extracting value with given index from a range.
Nov 21 2021
On the second thought, the two operations (pdl_interp.get_defining_op and pdl_interp.get_users) are not symmetric. And I do see value in mimicking c++ API. I will make the change requested.
Also, as much as I understand that we are defining this new op based on a limited use case, under what circumstances would we want to return all the users of a range? In PDL, the range of values will always show up together as operands, so returning the users of a representative seems just fine.
@rriddle I am happy to make pdl_interp.get_users return all users for a range to match the ResultRange behavior (and updating the PDL-to-PDLInterp lowering). But aren't we equally worried about the inconsistency of pdl_interp.get_defining_op and pdl_interp.get_users? And does this mean I need to introduce another operation to extract the value from a list?
Extract the previous code iterator manually.
Nov 18 2021
Print location instead of line numbers.
Updated code to simplified pdl_interp.get_users.
Rebased.
Simplified GetUsers.
Fixed English mistake.
Simplified pdl_interp.get_users.
Split GetUsers into GetUsersAll and GetUsersAt.
There are two places where we do an extra traversal: 1) when verifying the PDL pattern (checking for connectivity), and 2) when forming the predicate tree (detecting the roots). Both are O(E), where E is the total number of operands across all the operations in the PDL pattern -- hardly an expensive operation. Just to be sure, I did a barebones test, where I took 100 copies of test/Conversion/PDLToPDLInterp/pdl-to-pdl-interp-matcher.mlir concatenated together, and ran mlir-opt -split-input-file -convert-pdl-to-pdl-interp > /dev/null on the resulting file. The runtime of my version and the baseline version of mlir-opt were the same.
Nov 16 2021
Rebased
Rebased.
Split out the debug functionality & further review feedback.
Nov 14 2021
Gentle ping, @rriddle @mehdi_amini
Nov 5 2021
@rriddle: This is the last remaining diff. If you can re-review it whenever you are free, that would be greatly appreciated. Then we can land all 4 and iterate. Thank you!
Nov 4 2021
Final review feedback; also fixed the connected component checking code.
Rebased.
Updated comment with the IntervalMap fix.
Replaced ForEachOp::create with a custom builder.
Ran clang-format.
Oct 22 2021
Oct 20 2021
Addressed review feedback.
Addressed review feedback.
Attempt to fix a rebase problem.
I am sorry, I am not sure why my recent changes to PDLInterps files are showing up here. It's as if the base commit was not set right. I did update the stack diff #1. Any ideas?
Addressed review feedback and made further improvements:
- Fixed the insertion point on pdl_interp.create_operation.
- Fixed the implementation of pdl_interp.get_users to match its semantics specified in stacked diff #1.
- Eliminated the extra map storing the block for each instruction address. Instead, we store the line number of the instruction directly in the bytecode when debug messages are turned on.
- pdl_interp.foreach no longer consumes the range being iterated over. Instead, we store the index into the range and update this index every time we call pdl_interp.continue.
- PDLByteCodeMutableState::opRangeMemory now stores an owning reference to each range.
- Improved unit tests coverage.
Cleaned up the semantics of pdl_interp.get_users for range of values.
Oct 18 2021
Oct 17 2021
Oct 14 2021
Oct 12 2021
Thanks, I will make the changes suggested.
Thank you for the review @rriddle. Will submit an update later today.
Oct 10 2021
Migrated to pdl_interp.foreach and autodetecting roots
Addressed review feedback.