Selective Lambda Lifting

10/25/2019
by   Sebastian Graf, et al.
0

Lambda lifting is a well-known transformation, traditionally employed for compiling functional programs to supercombinators. However, more recent abstract machines for functional languages like OCaml and Haskell tend to do closure conversion instead for direct access to the environment, so lambda lifting is no longer necessary to generate machine code. We propose to revisit selective lambda lifting in this context as an optimising code generation strategy and conceive heuristics to identify beneficial lifting opportunities. We give a static analysis for estimating impact on heap allocations of a lifting decision. Performance measurements of our implementation within the Glasgow Haskell Compiler on a large corpus of Haskell benchmarks suggest modest speedups.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/16/2021

Automating the Functional Correspondence between Higher-Order Evaluators and Abstract Machines

The functional correspondence is a manual derivation technique transform...
research
02/25/2023

Suspension Analysis and Selective Continuation-Passing Style for Higher-Order Probabilistic Programming Languages

Probabilistic programming languages (PPLs) make encoding and automatical...
research
07/09/2022

A Closer Look into Transformer-Based Code Intelligence Through Code Transformation: Challenges and Opportunities

Transformer-based models have demonstrated state-of-the-art performance ...
research
06/23/2021

Threaded Code Generation with a Meta-tracing JIT Compiler

Language implementation frameworks, e.g., RPython and Truffle/Graal, are...
research
08/20/2017

Fast Access to Columnar, Hierarchically Nested Data via Code Transformation

Big Data query systems represent data in a columnar format for fast, sel...
research
03/02/2023

BenchDirect: A Directed Language Model for Compiler Benchmarks

The exponential increase of hardware-software complexity has made it imp...

Please sign up or login with your details

Forgot password? Click here to reset