hash-org / hash-org/hashc

Implement register allocation system

Open
#1,028 0 comments 0 reactions 1 assignee Claimed by @feds01 View on GitHub
lowering vm
Dominant language
Rust
Stars
28
Forks
1
PR merge metrics
No merged PRs in 30d

Description

This will be needed for implementing custom backends like the VM and (potentially in the future other architecture backends like `x86`).

It should be agnostic to a backend, and can just output information about which liveness intervals, and which physical registers should be assigned to what locals.

The conditions for the register allocator to run are that:
- the IR has finished optimisations
- the IR is in SSA form

The register allocator will likely implement the Linear Scan Register Allocation algorithm (https://link.springer.com/content/pdf/10.1007/3-540-45937-5_17.pdf).

Some implementation references are:
- `regalloc2` - https://github.com/bytecodealliance/regalloc2
- `luaJIT` - https://github.com/LuaJIT/LuaJIT/

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.