Font Size: a A A

Fast Backend Porting And Optimization For NiosⅡ Processor Based On LLVM

Posted on:2012-07-30Degree:MasterType:Thesis
Country:ChinaCandidate:N LuFull Text:PDF
GTID:2218330335491065Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
Compiler is the basis of embedded systems development. Implementing quickly embedded systems compiler of hardware platform-specific can greatly shorten the development period of embedded systems. Currently research and development personnel mainly use the method of GCC compiler backend-porting to generate embedded systems compiler. GCC mainly uses Register Transfer Language (RTL) to describe backend processor, but RTL is too abstract and complex to write and read. At the same time, complex software architecture of GCC and the lack of backend-porting documents cause that the method of GCC compiler backend-porting can not meet the requirements of the short development period of embedded system. How to quickly implement compiler backend-porting is still a hot research.Firstly, this thesis adopts a new compiler framework which is called Low Level Virtual Machine (LLVM), and analyses the backend-porting architecture of LLVM by porting NiosII embedded processor. It uses TableGen in backend-porting architecture to describe basic architecture of NiosII processor, and uses complete LLVM C++library to describe the complex or special operations. The match usage of TableGen and LLVM C++library realizes LLVM compiler to support NiosII backend processor. The experimental results indicate that backend-porting method which based on LLVM reduces the source lines of code (SLOC) and does not need to imitate the existing processors, and compared with backend-porting method based on GCC, the method greatly shortens the backend-porting period.Secondly, in order to accelerate the backend-description speed of target processor, this thesis studies and implements the backend-description assistant system. Ascribe the existence of a great number of complex and repeated TableGen description which are text format in LLVM backend-porting architecture, this thesis designs a humanization and visualization backend-description assistant system. We input a few backend information of target processor, and the backend-description assistant system quickly generates the corresponding TableGen description files.At last, this thesis takes paper-counting system as a starting point, in view of the heavy computation and the large loop count features of image-processing for paper, this thesis studies and implements the loop optimization function of LLVM compiler, and optimizes paper-counting system with it. The experimental results indicate that the image-processing speed of paper-counting system is improved by 10.1%~14.6%.
Keywords/Search Tags:compiler, backend-porting, low level virtual machine, backend-description, Loop Optimization
PDF Full Text Request
Related items