Published December 2024 | Version v1
Thesis Open

Flow-directed Space-efficient Closure Conversion

  • 1. University of Chicago

Contributors

Advisor:

Committee members:

Description

In higher-order languages, a function captures its free variables in a closure, often implemented as a flat record. While this simple structure is effective, more sophisticated representations can significantly reduce overhead. To manage the multiplicity of possible closure representation decisions, this paper introduces a model that represents closure decisions and a transformation that applies these decisions to a program. This paper presents several optimization passes that rewrite the closure representations, each of which greedily minimizes the dynamic allocation required for closures. Higher-order control-flow analysis provides more information about the flows of function values. This information is used both to justify the soundness for some of the proposed rewriting passes and to provide heuristics for others. This paper presents an efficient implementation of 0-CFA with supports for ref-cells and separate compilation. This novel approach is implemented in the Standard ML of New Jersey compiler and evaluated against the existing implementation. The results show that this approach is scalable to large programs and effective in reducing dynamic allocations.

Files

paper.pdf

Files (649.1 kB)

Name Size Download all
Thesis
md5:1677c7dfe211865096dcb93a57cc8927
649.1 kB Preview Download

Additional details

Identifiers

Other
oai:uchicago.tind.io:15612

UChicago Information

Division(s)
Physical Sciences Division
Department(s)
Computer Science