On-stack replacement for program generators and source-to-source compilers
On-stack replacement for program generators and source-to-source compilers
复制标题
程序生成器和源到源编译器的栈上替换
DOI:
10.1145/3486609.3487207
复制
发表时间:
2021
期刊:
影响因子:
--
通讯作者:
Tiark Rompf
中科院分区:
文献类型:
--
作者:
Grégory M. Essertel;Ruby Y. Tahboub;Tiark Rompf
On-stack replacement (OSR) describes the ability to replace currently executing code with a different version, either a more optimized one (tiered execution) or a more general one (deoptimization to undo speculative optimization). While OSR is a key component in all modern VMs for languages like Java or JavaScript, OSR has only recently been studied as a more abstract program transformation, independent of language VMs. Still, previous work has only considered OSR in the context of low-level execution models based on stack frames, labels, and jumps. With the goal of making OSR more broadly applicable, this paper presents a surprisingly simple pattern for implementing OSR in source-to-source compilers or explicit program generators that target languages with structured control flow (loops and conditionals). We evaluate our approach through experiments demonstrating both tiered execution and speculative optimization, based on representative code patterns in the context of a state-of-the-art in-memory database system that compiles SQL queries to C at runtime. We further show that casting OSR as a high-level transformation enables new speculative optimization patterns beyond what is commonly implemented in language VMs.
DOI:
10.1109/icde.2018.00027
发表时间:
2018
期刊:
2018 IEEE 34th International Conference on Data Engineering (ICDE)
影响因子:
--
作者:
J. André Kohn;Viktor Leis;Thomas Neumann
通讯作者:
Thomas Neumann
DOI:
10.14778/2002938.2002940
发表时间:
2011
期刊:
Proc. VLDB Endow.
影响因子:
--
作者:
T. Neumann
通讯作者:
T. Neumann