ILDJIT: A Compilation Framework for CIL Bytecode

180
Опубликовано 17 августа 2016, 20:50
The use of a virtual machine language, instead of machine code, is by now a well-established and successful technique for porting programs across different hardware platforms, without incurring into the difficulties and draw-backs of software distribution, when done at source-language level. In addition, interoperability between different source languages is made possible by their translation into a common suitable virtual code. Java bytecode first, and then CLI (Common Language Infrastructure) are the de facto industrial standards for such virtualization of the Instruction Set Architecture (ISA). In particular CLI has become a very attractive framework, where applications written in multiple high-level languages, including also unmanaged language like C, can be executed in different system environments, at no cost for adaptation. The increasing acceptance of CLI, also in areas traditionally reserved to direct compilation into machine code, is witnessed by the growth and consolidation over the years of the tool chains needed to support virtualization, namely static front-end compilers translating popular source languages into virtual code, and Virtual Execution Systems (VES), such as .NET, Mono, and Portable.Net. Although the first VES's were based on code interpretation, all modern ones use instead Dynamic Compilation (DC), in order to achieve better performances. A VES is a very complex software system that takes years for his development and in a sense is never finished, since new requirements keep coming from the advances in machine architectures, source languages, operating systems and middleware. Therefore it is not surprising that the current generation of VES has been designed having in mind the desktop personal computers and the traditional embedded systems, before the advent of multi-core architectures and single-chip multiprocessors, and without taking into consideration the great opportunities they offer for parallelization inside the VES and between VES and application. The new open-software VES that we present here is named ILDJIT. It is intended for distributed and parallel architectures, and flexible enough to easily adapt to the evolving and hard to anticipate requirements of modern computer platforms. ILDJIT is designed to be easily extensible by providing a framework where existing modules can be substituted by user customized ones. It is obvious that on a computer with more processors than application threads, the VES can run uninterrupted on a processor, so that many ompilation/application balancing problems found on single processor machine simply disappear. In order to take full advantage of the high degree of parallelism of future platforms, we designed the dynamic compiler as a parallel distributed program. Compiler parallelism is manifold. First, the compiler phases are organized as a pipeline so that several CIL methods can be simultaneously compiled by different compilation phases. Second, since many kinds of optimizations are applied in static compilers, and it is not a priori known which of them are more effective in a dynamic setting, we decided to design separate optimizers as processes running on a common Intermediate Representation (IR). Third, the VES software architecture ought to be flexible and open to an unpredictable number of new modules, as the project progresses and experience tells us which optimizations are productive for which applications. To obtain flexibility and modularity most modules are implemented as plug-ins (external libraries detected and loaded at runtime).
Случайные видео
168 дней – 145 7595:04
Why Do Speakers Hiss?
04.06.22 – 1 630 5000:41
Why Dial-Up Sounded Funny! #Shorts
автотехномузыкадетское