Advanced search
Start date
Betweenand


ADL based automatic compiler backend generation

Full text
Author(s):
Rafael Auler
Total Authors: 1
Document type: Master's Dissertation
Press: Campinas, SP.
Institution: Universidade Estadual de Campinas (UNICAMP). Instituto de Computação
Defense date:
Examining board members:
Paulo Cesar Centoducatte; Olinto Jose Varela Furtado; Rodolfo Jardim de Azevedo
Advisor: Paulo Cesar Centoducatte
Abstract

Researchers pursue the automation of compiler backend generation, the component responsible for final translation from intermediate language to machine code, since the begining of compilers theory creation. The separation between the algorithms used in the backend and formal machine description, which encompasses knowledge about the target architecture, is an important feature, since it facilitates the creation of new backends without the need for deep understanding of the compiler project. For this reason, an effort to maintain the development natural, simple and intuitive must concentrate the knowledge of the target machine in a concise description in a way it is possible to specialize generic algorithms to this target. An architecture description language (ADL) allows the specification of architectural features of processors, comprising the instruction set architecture available. This work presents a study of mechanisms for generating compiler backend through architectural descriptions of processors, with emphasis on a case study of the ArchC ADL with the LLVM compiler. We developed an automatic backend generator prototype for LLVM backends based on ArchC and successfully generated backends for the architectures ARM, MIPS, PowerPC and SPARC. To achieve this, we used a search algorithm to solve the problem of automatic programming and to infer how to implement pre-selected fragments of LLVM intermediate language using instructions of an arbitrary target architecture. We present four techniques to increase the speed of this algorithm which not only enables a solution for the automatic generation of backends, but also completes the process in less than 20 seconds for three of four architectures tested. Test compilation of Mibench benchmark programs attested the proper functioning of the backend and revealed that the quality of the generated code can compare with that of existing compilers, if a peephole optimizer were used to perform some simple substitutions of inefficient sequences (AU)

FAPESP's process: 10/02230-5 - ADL based automatic generation of compiler backends
Grantee:Rafael Auler
Support Opportunities: Scholarships in Brazil - Master