Guard recursion in will_simplify_with_ireduce#7882
Merged
fitzgen merged 1 commit intobytecodealliance:mainfrom Feb 7, 2024
Merged
Guard recursion in will_simplify_with_ireduce#7882fitzgen merged 1 commit intobytecodealliance:mainfrom
will_simplify_with_ireduce#7882fitzgen merged 1 commit intobytecodealliance:mainfrom
Conversation
Add a test to expose issues with unbounded recursion through `iadd` during egraph rewrites, and bound the recursion of `will_simplify_with_ireduce`. Fixes bytecodealliance#7874 Co-authored-by: Nick Fitzgerald <fitzgen@gmail.com>
Subscribe to Label ActionDetailsThis issue or pull request has been labeled: "cranelift", "isle"Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
elliottt
added a commit
to elliottt/wasmtime
that referenced
this pull request
Feb 7, 2024
Add a test to expose issues with unbounded recursion through `iadd` during egraph rewrites, and bound the recursion of `will_simplify_with_ireduce`. Fixes bytecodealliance#7874 Co-authored-by: Nick Fitzgerald <fitzgen@gmail.com>
This was referenced Feb 7, 2024
elliottt
added a commit
that referenced
this pull request
Feb 7, 2024
Add a test to expose issues with unbounded recursion through `iadd` during egraph rewrites, and bound the recursion of `will_simplify_with_ireduce`. Fixes #7874 Co-authored-by: Nick Fitzgerald <fitzgen@gmail.com>
elliottt
added a commit
to elliottt/wasmtime
that referenced
this pull request
Feb 7, 2024
Add a test to expose issues with unbounded recursion through `iadd` during egraph rewrites, and bound the recursion of `will_simplify_with_ireduce`. Fixes bytecodealliance#7874 Co-authored-by: Nick Fitzgerald <fitzgen@gmail.com>
elliottt
added a commit
that referenced
this pull request
Feb 7, 2024
* Guard recursion in `will_simplify_with_ireduce` (#7882) Add a test to expose issues with unbounded recursion through `iadd` during egraph rewrites, and bound the recursion of `will_simplify_with_ireduce`. Fixes #7874 Co-authored-by: Nick Fitzgerald <fitzgen@gmail.com> * Cranelift: Use a fixpoint loop to compute the best value for each eclass (#7859) * Cranelift: Use a fixpoint loop to compute the best value for each eclass Fixes #7857 * Remove fixpoint loop early-continue optimization * Add document describing optimization rule invariants * Make select optimizations use subsume * Remove invalid debug assert * Remove now-unused methods * Add commutative adds to cost tests * Add missing subsume uses in egraph rules (#7879) * Fix a few egraph rules that needed `subsume` There were a few rules that dropped value references from the LHS without using subsume. I think they were probably benign as they produced constant results, but this change is in the spirit of our revised guidelines for egraph rules. * Augment egraph rule guideline 2 to talk about constants * Update release notes --------- Co-authored-by: Nick Fitzgerald <fitzgen@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Expose the underlying issue of #7874 by adding a test with a long chain of additions, and then fix the bug by bounding the recursion of
will_simplify_with_ireduce.Reading through the changes in #7719, it seemed like the recursive cases in
will_simplify_with_ireducewere missing two things:reducible_modular_opbefore the recursion, which showed up in the entry-point insimplifyThis PR makes both of these changes, and resolves the compilation time issues reported in #7874. The depth bound was arbitrary, and it would be fine to increase it if necessary.
Fixes #7874