Fast Compiler Re-Targeting to Different Platforms by Translating at Intermediate Code Level

Norio SATO  

IEICE TRANSACTIONS on Communications   Vol.E82-B   No.6   pp.923-935
Publication Date: 1999/06/25
Online ISSN: 
Print ISSN: 0916-8516
Type of Manuscript: PAPER
Category: Communication Software
telecommunications software,  compiler multiple targeting,  intermediate language,  attributed abstract syntax tree,  front-end,  back-end,  

Full Text: PDF>>
Buy this Article

The intermediate language (IL) modularizes a compiler into target processor independent and dependent parts, called the front-end and the back-end. By adding a new back-end, it is possible to port existing software from one processor to another. This paper presents a new efficient approach to achieve multiple targeting to quite different architectures using different processors as well, by translating from one IL into other existing ILs. This approach makes it possible to reuse existing back-ends. It has been successfully applied to a commercial-scale project for porting public switching system software. Since the target ILs were not predictable in advance, we provided an abstract syntax tree (AST) with attributes accessible by abstract data type (ADT) interface to convey the source language information from our front-end to back-ends. It was translated into several ILs that were developed independently. These translations made the compiler available in a very short time for different cross-target platforms and on several workstations we needed. The structure of this AST and the mapping to these ILs are presented, and retargeting cost is evaluated.