首页> 外文期刊>Concurrency and Computation >Optimizing code-copying JIT compilers for virtual stack machines
【24h】

Optimizing code-copying JIT compilers for virtual stack machines

机译:为虚拟堆栈机优化代码复制JIT编译器

获取原文
获取原文并翻译 | 示例

摘要

Just-in-time (JIT) compilers are widely used to implement stack-based virtual machines, such as the Java and .NET virtual machines. One disadvantage of most JIT compilers is that they are unportable; much of the back-end is specific to the target machine. An alternative to machine-specific code generation methods is to define a routine in a high-level language for each virtual machine instruction. These can be compiled to native code using a normal C compiler. The native code for these routines can then be strung together, allowing very simple, unoptimized code to be produced just in time. In this paper we present such a system based on an existing implementation of the Forth language. We present a novel system of optimizations for the system based on exploiting common sequences of virtual machine instructions. We use a small domain specific language and tool to generate stack-optimized code for sequences of virtual machine instructions, and for choosing the most useful sequences for a code-copying compiler. By measuring the length of the resulting executable code, we allow machine-specific sequences to be chosen without any machine-dependent code in our system. Experimental results show that best (average) speedups of 47.2% (15.75%) are possible on a Pentium 4 machine, and even higher an a PowerPC based machine. Furthermore, our optimizations allow the size of the generated code to be reduced by an average of 17.9% on the Pentium 4, and 20.5% on the PowerPC over a wide range of programs.
机译:即时(JIT)编译器被广泛用于实现基于堆栈的虚拟机,例如Java和.NET虚拟机。大多数JIT编译器的缺点之一是它们不可移植。后端的大部分特定于目标计算机。特定于机器的代码生成方法的替代方法是为每条虚拟机指令定义一种高级语言的例程。可以使用普通的C编译器将它们编译为本机代码。然后可以将这些例程的本机代码串在一起,从而允许及时生成非常简单,未经优化的代码。在本文中,我们介绍了一种基于Forth语言现有实现的系统。我们提出了一种基于利用虚拟机指令的公共序列的系统优化的新颖系统。我们使用一种特定于领域的小型语言和工具为虚拟机指令序列生成堆栈优化代码,并为代码复制编译器选择最有用的序列。通过测量生成的可执行代码的长度,我们允许选择特定于机器的序列,而无需在系统中使用任何与机器相关的代码。实验结果表明,在Pentium 4机器上,最佳(平均)提速可能达到47.2%(15.75%),在基于PowerPC的机器上甚至更高。此外,通过我们的优化,在各种程序中,奔腾4上生成的代码大小平均减少了17.9%,而PowerPC上平均减少了20.5%。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号