Compiling with Continuations and LLVM
Kavon Farvardin (University of Chicago), John Reppy (University of, Chicago)

TL;DR
This paper introduces a new LLVM backend supporting heap-allocated continuation closures, enabling efficient callcc and lightweight multithreading, beneficial for functional language compilers.
Contribution
It presents a novel LLVM backend design that accommodates heap-allocated continuations, improving support for functional language features.
Findings
Enables constant-time callcc operations.
Supports very-lightweight multithreading.
Implemented in the Parallel ML compiler.
Abstract
LLVM is an infrastructure for code generation and low-level optimizations, which has been gaining popularity as a backend for both research and industrial compilers, including many compilers for functional languages. While LLVM provides a relatively easy path to high-quality native code, its design is based on a traditional runtime model which is not well suited to alternative compilation strategies used in high-level language compilers, such as the use of heap-allocated continuation closures. This paper describes a new LLVM-based backend that supports heap-allocated continuation closures, which enables constant-time callcc and very-lightweight multithreading. The backend has been implemented in the Parallel ML compiler, which is part of the Manticore system, but the results should be useful for other compilers, such as Standard ML of New Jersey, that use heap-allocated continuation…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsParallel Computing and Optimization Techniques · Embedded Systems Design Techniques · Real-Time Systems Scheduling
