Font Size: a A A

Research On Peephole Optimization Of LLVM Compiler Based On Sunway Platform

Posted on:2021-01-08Degree:MasterType:Thesis
Country:ChinaCandidate:H HuFull Text:PDF
GTID:2428330602977846Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
Independent control is an important guarantee of information security and even national security.With the continuous promotion of national independent control strategy,a large number of domestic software and hardware technologies have emerged,such as Sunway processor,Loongson processor,Deepin operating system,Kylin operating system and UOS operating system.More and more attention has been paid to the development of efficient compiler based on domestic platform and operating system.LLVM is a framework system of architecture compiler written by C++,which supports multi-backend and cross-compilation.It is of great significance to study the LLVM compiler based on Sunway platform.This paper focuses on the study of the peephole optimization method in the LLVM compiler of Sunway platform,and proposes the node fusion optimization method to solve the problem of overoptimization of the peephole optimization and underutilization of Sunway platform specific instructions in the LLVM compiler.The main tasks completed are as follows:1.The node fusion optimization algorithm is proposed.The basic idea of node fusion is to optimize multiple nodes into an efficient fusion node,reducing overhead such as instructions,registers,clock cycles,memory access,etc.,to reduce program runtime and improve memory access efficiency And other purposes.By studying the peephole optimization technology in LLVM compiler on Sunway platform and combining the characteristics of Sunway platform instruction set,a node fusion optimization method is proposed.2.The node fusion optimization experiment and analysis are carried out based on Sunway platform.In order to improve the performance of the LLVM compiler,a node fusion optimization method is proposed in the intermediate representation stage,DAG merge stage,and instruction selection stage of the LLVM compilation process.Under the Sunway processor of 1621,CLANG and FLANG are used as the front-end of the compiler,LLVM is used as the compiler back-end,and the evaluation is based on the SPEC CPU2006 benchmark set.The experimental results show that node fusion optimization is beneficial to improve the compiler performance and reduce the program running time,after optimization,the maximum acceleration ratio is 1.59,and the average acceleration ratio is 1.13.And has been practical application in LLVM compiler on Sunway platform.
Keywords/Search Tags:Sunway platform, LLVM, Peephole optimization, Node fusion
PDF Full Text Request
Related items