Smart selection of optimizations in dynamic compilers

Summary Dynamic compilers perform compilation and generation of target code during runtime, implying that the compilation time is added into the program runtime. Thus, to build a high‐performing dynamic compilation system, it is crucial to be able to generate high‐quality code and, at the same time,...

Full description

Saved in:
Bibliographic Details
Published inConcurrency and computation Vol. 33; no. 18
Main Authors Martins do Rosario, Vanderson, Faustino da Silva, Anderson, Aparecida Silva Camacho, Thais, Napoli, Otávio O., Breternitz, Mauricio, Borin, Edson
Format Journal Article
LanguageEnglish
Published Hoboken Wiley Subscription Services, Inc 25.09.2021
Subjects
Online AccessGet full text

Cover

Loading…
More Information
Summary:Summary Dynamic compilers perform compilation and generation of target code during runtime, implying that the compilation time is added into the program runtime. Thus, to build a high‐performing dynamic compilation system, it is crucial to be able to generate high‐quality code and, at the same time, have a small compilation cost. In this article, we present an approach that uses machine learning to select sequences of optimization for dynamic compilation that considers both code quality and compilation overhead. Our approach starts by training a model, offline, with a knowledge bank of those sequences with low overhead and high‐quality code generation capability using a genetic heuristic. Then, this bank is used to guide the smart selection of optimizations sequences for the compilation of code fragments during the emulation of an application. We evaluate the proposed strategy in two LLVM‐based dynamic binary translators, namely OI‐DBT and HQEMU, and show that these two translators can achieve average speedups of 1.26x and 1.15x in MiBench and Spec Cpu benchmarks, respectively.
Bibliography:Funding information
CNPq, 313012/2017‐2; FAPESP, 2013/08293‐7; Petrobras
ISSN:1532-0626
1532-0634
DOI:10.1002/cpe.6089