-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
consolidate all the InList
rewrites into a single pass
#9140
Comments
I am not sure if @guojidan plans to work on this one. If not I think it would make a good first issue for someone |
I don't have much time recently because the Spring Festival holiday has arrived. So If everyone is interested, let's implement this 😄 |
I think it is a heuristic that avoids pathalogical cases when there are large numbers constants in the For example: (it would be great if you had a chance to add some comments with rationale) |
Thank you @alamb , I will add a comment. I attempted to do the in list simplifier in one pass . I am not really sure if its possible in a single pass. Here is the test which is failing if i try that .
After the first pass it simplifies to
After the
If i try to combile the
is getting simplified to |
Ths sounds like the logic for the two simplifications is being invoked in a different order (or maybe only one is being invoked? 🤔 ). Could we perhaps invoke both simplications but invoke the code to simplify first and then the code to shorten?
That is good data and more reason I think to consolidate the passes. Thank you |
hi @manoj-inukolunu ,
if we combile the
maybe you can view older version inlist simplifier logical(before my pr), I can got more inspiration |
So, the key of this issue is how to determine the time to execute |
@manoj-inukolunu @guojidan Is anyone working on this currently? If not, I will take a a look on this issue. |
I am not working on this, thank you |
FYI @jayzhan211 I had started playing with this at some point but didn't finish One approach might be to port individual parts of the inlist rewrite in multiple PRs (the entire logic was quite tricky, so doing it incrementally would likely be easier to code and easier to review) |
@alamb Are you talking about removing cloned or moving I'm looking into the issue of moving short inlist, and I found that it may not able to move into the inlist simplifier. |
I was thinking in general to simplify the problem by moving as many rules as possible into the large
I agree -- f_up gets run on each Expr of the tree so you can't express "apply three rules after this other" So maybe we could move the three rules first into the large |
Thanks again
Originally posted by @alamb in #9037 (review)
The text was updated successfully, but these errors were encountered: