Lune

PLDI2026顶会

Flow-Analysis-Based Closure Optimization

John H. Reppy, Olin Shivers, Byron Zhong

摘要

One of the key implementation challenges for higher-order functional languages is managing the representation of first-class function values. The standard approach to this problem is closure conversion, which is a compiler transformation that introduces an explicit data structure to represent the environment of a function value. Constructing the closure for a nested function usually involves copying data from the enclosing function’s closure. To avoid this copying, one might use linked representations, but that choice makes variable access slow and can introduce space leaks. Shao and Appel developed an effective closure converter that reduces copying and is safe-for-space, but their converter is based on a weak, first-order analysis. In this paper, we present a new safe-for-space closure converter that uses a higher-order flow analysis to inform closure-representation decisions. We describe how this information can be used to improve two aspects of closure optimization: sharing heap-allocated tuples of variables and spreading variables into argument registers. We have implemented our converter in the Standard ML of New Jersey system and demonstrated that it produces better code on average than the Shao and Appel converter, with significant performance gains for some benchmarks.

问 Lune

几分钟看清这篇 Paper 的位置,不用再花一下午。

Lune 能读引用它和与它最相关的顶会 Paper,讲清它说了什么、后来怎样、哪里站不住,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

可以从这些问题问起

Lune 可以查阅

摘要 · 相关的 Paper

获取答案

免费开始,无需绑卡

相关 Paper

  1. Type-Preserving Flat Closure OptimizationAdam T. Geller, Sean Bocirnea, Chester J. F. Gould, Paulette Koronkevich 等OOPSLA 2025
  2. SSA without Dominance for Higher-Order ProgramsRoland Leißa, Johannes GrieblerPLDI 2026
  3. Parallelism in a Region Inference ContextMartin Elsman, Troels HenriksenPLDI 2023 · 2 次引用
  4. Better Defunctionalization through Lambda Set SpecializationWilliam Brandon, Benjamin Driscoll, Frank Dai, Wilson Berkow 等PLDI 2023 · 7 次引用
  5. A High-Level Separation Logic for Heap Space under Garbage CollectionAlexandre Moine, Arthur Charguéraud, François PottierPOPL 2023
黄昏的海面,两侧是细线勾勒的悬崖