Skip to content

Zero alloc: resolve dependencies earlier#2491

Closed
gretay-js wants to merge 41 commits intooxcaml:mainfrom
gretay-js:zero_alloc_sym_deps
Closed

Zero alloc: resolve dependencies earlier#2491
gretay-js wants to merge 41 commits intooxcaml:mainfrom
gretay-js:zero_alloc_sym_deps

Conversation

@gretay-js
Copy link
Copy Markdown
Contributor

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:

  • generalize Value.apply to 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.
  • a module to track unresolved dependencies: this is a bit easier than in the previous versions of the analysis, because we can just inspect a symbolic summary to find what it depends on.
  • refactor fixpoint function slightly so we can use it for both the final fixpoint and for resolving "self" recursive functions.

@gretay-js gretay-js requested a review from xclerc April 24, 2024 17:04
@mshinwell mshinwell added the zero alloc zero-alloc check label May 2, 2024
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, \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(default %d, negative to fail instead of widenning, \
(default %d, negative to fail instead of widening, \

@gretay-js
Copy link
Copy Markdown
Contributor Author

Included in #2524

@gretay-js gretay-js closed this May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend zero alloc zero-alloc check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants