Zero alloc: resolve dependencies earlier#2491
Closed
gretay-js wants to merge 41 commits intooxcaml:mainfrom
Closed
Zero alloc: resolve dependencies earlier#2491gretay-js wants to merge 41 commits intooxcaml:mainfrom
gretay-js wants to merge 41 commits intooxcaml:mainfrom
Conversation
xclerc
reviewed
Apr 25, 2024
xclerc
reviewed
Apr 25, 2024
xclerc
reviewed
May 2, 2024
driver/flambda_backend_args.ml
Outdated
| let mk_checkmach_join f = | ||
| "-checkmach-join", Arg.Int f, | ||
| Printf.sprintf " How many abstract paths before losing precision \ | ||
| (default %d, negative to fail instead of widenning, \ |
Contributor
There was a problem hiding this comment.
Suggested change
| (default %d, negative to fail instead of widenning, \ | |
| (default %d, negative to fail instead of widening, \ |
... for the lack of a better name
Refactor [fixpoint]. Maybe this should be split into separate commits, but it is convenient to return [unresolved_names] from [self_rec_fixpoint] without penalising computations when everything is "resolved".
xclerc
approved these changes
May 2, 2024
a7275af to
eab9f8d
Compare
Contributor
Author
|
Included in #2524 |
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.
On top of #2490.
This PR resolves some dependencies earlier instead of waiting until the end of the compilation unit.
It resolves dependencies caused by "forward referenced" functions and "self" recursive functions that do not have any other unresolved dependencies. It doesn't resolve mutually recursive functions early.
Main changes:
Value.applyto be "partial" : when some but all dependencies are resolved, we can use it to simplify a symbolic summary, even if it does not become resolved as a result.fixpointfunction slightly so we can use it for both the final fixpoint and for resolving "self" recursive functions.