Lazy Evaluation for the Lazy: Automatically Transforming Call-by-Value into Call-by-Need
This paper introduces lazification, a code transformation technique that replaces strict with lazy evaluation of function parameters whenever such modification is deemed profitable. The transformation is designed for an imperative, low-level program representation. It involves a static analysis to identify function calls that are candidates for lazification, plus the generation of closures to be lazily activated. Code extraction uses an adaptation of the classic program slicing technique adjusted for the static single assignment representation. If lazification is guided by profiling information, then it can deliver speedups even on traditional benchmarks that are heavily optimized. We have implemented lazification on LLVM 14.0, and have applied it on the C/C++ programs from the LLVM test-suite and from SPEC CPU2017. We could observe statistically significant speedups over clang -O3 on some large programs, including a speedup of 11.1% on Prolang's Bison without profiling support and a speedup of 4.6% on SPEC CPU2017's perlbench (one of the largest programs in the SPEC collection) with profiling support.
Sun 26 FebDisplayed time zone: Eastern Time (US & Canada) change
11:20 - 12:20 | OptimizationsResearch Papers at St. Laurent 3 Chair(s): Louis-Noël Pouchet Colorado State University, USA | ||
11:20 20mTalk | A Hotspot-Driven Semi-automated Competitive Analysis Framework for Identifying Compiler Key Optimizations Research Papers Wenlong Mu East China Normal University, Yilei Zhang East China Normal University, Bo Huang East China Normal University, Jianmei Guo East China Normal University, Shiqiang Cui Hangzhou Hongjun Microelectronics Technology DOI | ||
11:40 20mTalk | LAGrad: Statically Optimized Differentiable Programming in MLIR Research Papers DOI | ||
12:00 20mTalk | Lazy Evaluation for the Lazy: Automatically Transforming Call-by-Value into Call-by-Need Research Papers Breno Campos Ferreira Guimarães Federal University of Minas Gerais, Fernando Magno Quintão Pereira Federal University of Minas Gerais DOI |