Simplify terminator integer condition#1809
Merged
mshinwell merged 4 commits intooxcaml:mainfrom Jul 4, 2024
Merged
Conversation
908ad14 to
2bec637
Compare
Contributor
Author
|
This optimization does not fire that
|
Contributor
|
This looks good, but could we extend it a bit to the case where the block has multiple assignments? Something like a block ending in |
Contributor
Author
|
I agree in principle, but would be tempted to |
Collaborator
|
That sounds like the right course of action to me - these PRs are overdue for merging as-is. |
Ekdohibs
approved these changes
Jul 4, 2024
Contributor
|
Good with me, we can do that later indeed. |
bclement-ocp
added a commit
to bclement-ocp/oxcaml
that referenced
this pull request
Jul 4, 2024
`Poll_and_jump` was removed in oxcaml#1927 but the recent merge of oxcaml#1809 tries to use it.
Ekdohibs
pushed a commit
to Ekdohibs/flambda-backend
that referenced
this pull request
Jul 5, 2024
* Statically evaluate terminators for conditions over integer values. * Eliminate dead blocks later since simplify_terminator can create more opportunities. * ocamformat * (debug) Partially revert Eliminate_dead_code move.
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 can sometimes statically determine the
destination of a conditional terminator, and
thus change it to a mere jump.
This pull request does so if the following case:
Iconst_intinstruction followed by an
Alwaysterminator;terminator which is an integer condition
over the same register used by the
Iconst_intinstruction;by changing the destination of the
Alwaysterminator.(ASCII art available at #1782)
Fixes #1782