-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Escape analysis
Goal: Implement escape analysis in order to avoid unnecessary heap allocations.
After translation, before gen phase, add a phase to annotate heap-exprs.
Escape phase
- Build a usage graph of exprs.
- Find all exprs that have usage links to return statements or towards heap-marked exprs.
- For any tuples that link to return statements, mark them as heap.
- Goto 2 until no more exprs are marked.
During gen phase, pay attention to heap-marks on tuples.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request