egraph opt rules: do (icmp cc x x) == {0,1} only for integer types.#5438
Merged
cfallin merged 1 commit intobytecodealliance:mainfrom Dec 14, 2022
Merged
egraph opt rules: do (icmp cc x x) == {0,1} only for integer types.#5438cfallin merged 1 commit intobytecodealliance:mainfrom
(icmp cc x x) == {0,1} only for integer types.#5438cfallin merged 1 commit intobytecodealliance:mainfrom
Conversation
(icmp x x) == 0 only for integer types.(icmp cc x x) == {0,1} only for integer types.
We could do these for vectors too, in theory, but for now let's fix the bug by applying the equivalence only for integer types. Fixes bytecodealliance#5437.
cfallin
added a commit
that referenced
this pull request
Jan 19, 2023
This PR follows up on #5382 and #5391, which rebuilt the egraph-based optimization framework to be more performant, by enabling it by default. Based on performance results in #5382 (my measurements on SpiderMonkey and bjorn3's independent confirmation with cg_clif), it seems that this is reasonable to enable. Now that we have been fuzzing compiler configurations with egraph opts (#5388) for 6 weeks, having fixed a few fuzzbugs that came up (#5409, #5420, #5438) and subsequently received no further reports from OSS-Fuzz, I believe it is stable enough to rely on. This PR enables `use_egraphs`, and also normalizes its meaning: previously it forced optimization (it basically meant "turn on the egraph optimization machinery"), now it runs egraph opts if the opt level indicates (it means "use egraphs to optimize if we are going to optimize"). The conditionals in the top-level pass driver are a little subtle, but will get simpler once we can remove the non-egraph path (which we plan to do eventually!). Fixes #5181.
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.
We could do these for vectors too, in theory, but for now let's fix the bug by applying the equivalence only for integer types.
Fixes #5437.