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

Precompute maximum heap allocation #1608

Merged
merged 5 commits into from
Nov 8, 2022
Merged

Precompute maximum heap allocation #1608

merged 5 commits into from
Nov 8, 2022

Conversation

lukaszcz
Copy link
Collaborator

@lukaszcz lukaszcz commented Nov 7, 2022

Description

  • Add a new Prealloc instruction which corresponds to the PREALLOC macro in the Juvix runtime.
  • Implement foldS using recurseS.
  • Using foldS, compute maximum memory allocation for each basic block, inserting Prealloc instructions at basic block boundaries.
  • Add a JuvixAsm transformation framework and tests.
  • Add Juvix.Compiler.Backend module which contains implementation-specific limit values for each backend runtime configuration (e.g. max number of constructors, closure head size).

Closes #1586

@lukaszcz lukaszcz added this to the 0.3 milestone Nov 7, 2022
@lukaszcz lukaszcz self-assigned this Nov 7, 2022
@lukaszcz lukaszcz added the asm label Nov 7, 2022
paulcadman
paulcadman previously approved these changes Nov 8, 2022
@lukaszcz lukaszcz merged commit 9d4f843 into main Nov 8, 2022
@lukaszcz lukaszcz deleted the asm-prealloc branch November 8, 2022 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compute maximum memory allocation in a single JuvixAsm function
2 participants