Evaluating Optimizations for a High-Level Language

  • Leonardo Kaplan PUC-Rio
  • Roberto Ierusalimschy PUC-Rio

Resumo


Pallene aims to be a system language counterpart for Lua, with similar syntax but ahead-of-time compilation. It also has optional typing and stricter semantics, allowing it to emit C code with unboxed values, which enable several optimizations in the C compiler. Assuming that, the current Pallene compiler does not implement most classic optimizations. However, the C compiler cannot perform all the expected optimizations due to the difference in the level of abstraction between Pallene and C. In this work, we studied several scenarios where the C compiler couldn’t perform those expected optimizations trying to understand why and implemented them in the Pallene compiler, which has higher-level understanding of the language. Among the implemented optimizations are function inlining and scalar replacement of aggregates, achieving results that bring evidence that higher level optimizations cannot be done in the lower level compiler.
Publicado
30/09/2021
KAPLAN, Leonardo; IERUSALIMSCHY, Roberto. Evaluating Optimizations for a High-Level Language. In: SIMPÓSIO BRASILEIRO DE LINGUAGENS DE PROGRAMAÇÃO (SBLP), 25. , 2021, Joinville. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2021 . p. 25–32.