Font Size: a A A

Research On LLVM JIT Compilation And Optimization Technology Based On Domestic Platform

Posted on:2021-05-07Degree:MasterType:Thesis
Country:ChinaCandidate:H S WangFull Text:PDF
GTID:2428330602976420Subject:Engineering
Abstract/Summary:PDF Full Text Request
Sunway series processors are domestic general-purpose processors with independent instruction sets and complete independent intellectual property rights.They have been successfully applied in many fields such as supercomputers,highperformance servers,storage systems,and network security.LLVM is widely adopted by commercial and open source projects as an open source compilation framework,especially its JIT(just-in-time)compilation system,which has become an infrastructure in the fields of big data and artificial intelligence.However,in the current software ecosystem of Sunway processors,the LLVM compiler framework has not yet been supported.Many projects developed based on LLVM cannot be migrated to the Sunway platform.Some information system infrastructures related to national economy and people's livelihood are facing potential security threats.The weakness of the software ecosystem further limits the application and promotion of Sunway processors,and it is urgent to introduce the LLVM compiler framework into the software ecosystem of Sunway processors.In addition,the JIT compiler has the characteristics of runtime compilation.The longer compilation time makes the JIT compiler run slower.In response to the above problems,this thesis uses the compiler backend porting method to implement the Sunway processor backend and related components in LLVM,so that the Sunway processor supports LLVM and its JIT compilation system;and by optimizing the code generation process,reduce the time for program compilation,and the overall performance of the JIT compiler is improved.The main research contents of this thesis are as follows:(1)Designed and implemented the LLVM JIT compiler on Sunway platform.By analyzing and studying the implementation principle of LLVM JIT compilation,the basic composition of the JIT compilation system and the functional principles of each part,as well as the backend porting mechanism of the LLVM compiler architecture,combined with the characteristics of the Sunway processor,it was ported on the domestic Sunway platform,and LLVM JIT compilation was implemented.(2)Based on the instruction selection technology,the LLVM JIT compiler of Sunway platform is optimized.Based on the characteristics of the LLVM JIT compiler's compiled code at runtime and the problem that the instruction selection time is too long in the LLVM backend code generation,the instruction selection process was adjusted and optimized to implement the fast instructions of the Sunway processor backend Options.By preferentially using the fast instruction selection scheme,the speed of instruction selection is improved to improve the overall performance of the JIT compiler to a certain extent.This thesis implements the LLVM JIT compiler on the Sunway platform,and optimizes the code generation process to improve the execution efficiency of the JIT compiler.Based on the LLVM test-suite to complete the relevant tests,verified the correctness of the Sunway platform LLVM JIT compiler.Based on the SPEC CPU2006 benchmark test set,the performance evaluation of the LLVM JIT compiler of the Sunway platform was performed.The test results showed that the average running time of the C / C ++ test program was reduced by 4.66% after fast instruction selection optimization.
Keywords/Search Tags:Sunway processor, LLVM, Just-in-time compilation, Compilation backend porting, Optimization
PDF Full Text Request
Related items