arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2106.12496cs.PL
收藏

基于元跟踪JIT编译器的线程代码生成

Threaded Code Generation with a Meta-Tracing JIT Compiler

Yusuke Izawa, Hidehiko Masuhara, Carl Friedrich Bolz-Tereick, Youyou Cong

摘要:

语言实现框架,例如,RPython和Truffle/Graal是创建高效虚拟机的实用工具,包括功能良好的即时(JIT)编译器。在这样的框架中支持多层JIT编译对语言开发者来说是一个很高的要求。本文提出了一种通过重用现有的元跟踪JIT编译器来生成线程代码的思想,并给出了相应的解释器设计。我们的方法并没有对RPython本身进行很大的修改,而是构造了一个有效的解释器定义,从而在RPython中实现线程代码生成。我们希望我们的系统能够扩展到支持RPython框架中的多级JIT编译。我们通过在PyPy中模拟线程化代码生成的行为来测量其潜在性能。我们证实,与PyPy的JIT编译器相比,我们的方法平均将代码大小减少了80%,编译时间减少了60%,并且比仅解释器执行快了约7%。

英文摘要:

Language implementation frameworks, e.g., RPython and Truffle/Graal, are practical tools for creating efficient virtual machines, including a well-functioning just-in-time (JIT) compiler. It is demanding to support multitier JIT compilation in such a framework for language developers. This paper presents an idea to generate threaded code by reusing an existing meta-tracing JIT compiler, as well as an interpreter design for it. Our approach does not largely modify RPython itself but constructs an effective interpreter definition to enable threaded code generation in RPython. We expect our system to be extended to support multilevel JIT compilation in the RPython framework. We measured the potential performance of our threaded code generation by simulating its behavior in PyPy. We confirmed that our approach reduced code sizes by 80 \% and compilation times by 60 \% compared to PyPy's JIT compiler on average, and ran about 7 \% faster than the interpreter-only execution.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑