-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add RVSDG subst functions #41
Conversation
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.
Requested some changes, this is very close to what we want!
) | ||
( | ||
(union (SubstVecVecOperandHelper (VVO vec) x v i) (VVO vec)) | ||
)) | ||
|
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.
Can you add a ruleset for the subst rules to make it more usable?
I'd also like the existing egglog encoding to run this ruleset to saturation in-between runs of the normal ruleset.
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.
Added all rules to the subst
ruleset, added the existing rules to constant-fold +/* to the cfold
ruleset, and made the schedule the following:
let schedule = format!("(run-schedule (repeat {} cfold (saturate subst)))", self.num_iters);```
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.
good job!
Summary
Adds the following functions, for use in writing passes over RVSDG
Updated the egglog revision we depend on as this feature relies on
vec-set
: egraphs-good/egglog#239Testing
Added tests to
src/rvsdg/tests.rs