Ordering Optimisations in Meta-Compilation of Primitive Methods
Résumé
Meta-compilation schemes help to automatically build Just-in-Time (JIT) compilers from interpreters by performing a meta-interpretation of the VM interpreter. Generated JIT compilers face the well-known problem of phase ordering: selecting a good optimisation sequence to apply to the compiled programs. Manual optimisation lists are hard to maintain and are one-size-fits-all solutions that assume that a single sequence is equally effective in all possible programs. Generating such a list automatically is still challenging nowadays. In this paper, we explore the phase-ordering problem in the case of the meta-compilation of Pharo VM interpreter primitives. In addition to a manual strategy, we present three automatic strategies to find good-enough optimisation sequences: a search-based approach, a predictive approach based on code shape, and an automatically-found fixed list approach. We compare them altogether by measuring the relative compiled code size and their rate of convergence. We evaluate this work over 17 of Pharo's language interpreter primitives. On average, the predictive strategy gives its optimal result before the rest with 21% fewer optimisations, the search strategy finds better results in complex cases. This article shows that automatic approaches seem promising for primitive meta-interpretation.
Domaines
Langage de programmation [cs.PL]
Origine : Fichiers produits par l'(les) auteur(s)