Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propagate arity between compilation units #1594

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Propagate arity between compilation units #1594

wants to merge 7 commits into from

Conversation

hhugo
Copy link
Member

@hhugo hhugo commented Apr 8, 2024

PoC for #550

  • Store immutability property of blocks
  • Try to recover some immutability info from debug events. (currently assuming modules are immutable, need to check what happens with recursive modules
  • Use this info to compute an approximated shape for registered globals.
  • Use shape info to compute function arity across compilation units (this is currently only done when compiling cma files as we know the shape of previously compiled units inside the library)

TODOs/Questions:

  • check the behavior with recursive modules
  • fix with effects
  • update global_flow ?
  • better mechanism for shape propagation ?-
  • store shape in a different file ? yes
  • should the "shape" file be given jsoo on the command line or should it look for it on the file system ? both
  • update dune rules with additional deps (WIP Jsoo shapes ocaml/dune#10767)

@hhugo hhugo requested a review from vouillon April 8, 2024 09:59
@hhugo
Copy link
Member Author

hhugo commented Apr 8, 2024

@vouillon, feel free to comment, review and even commit the branch.

compiler/lib/flow.ml Outdated Show resolved Hide resolved
compiler/lib/flow.ml Outdated Show resolved Hide resolved
compiler/lib/flow.ml Outdated Show resolved Hide resolved
compiler/lib/shape.ml Outdated Show resolved Hide resolved
Propagate shape information through the flow analysis

Function arity from shapes: take advantage of flow analysis
@hhugo hhugo marked this pull request as ready for review November 19, 2024 14:35
@hhugo hhugo changed the title PoC: Propagate arity between compilation units Propagate arity between compilation units Nov 19, 2024
@hhugo
Copy link
Member Author

hhugo commented Nov 19, 2024

@vouillon, I think we could merge this before we have the support merged inside dune.
Would you want to give it another round of review ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants