Font Size: a A A

Research On LLVM Function Inlining Optimization

Posted on:2016-11-10Degree:MasterType:Thesis
Country:ChinaCandidate:L F AnFull Text:PDF
GTID:2348330542976230Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
Function Inlining is a very important optimization technique that replaces a function call with the body of a function,which eliminates call cost and increases the chances of other optimizations taking effect due to the changing of the function characteristics,thus it can improves the quality of Machine Code,and promote program's performance.LLVM is an open source compiler framework developed by University of Illinois,which is sought after by research institutions and compilation lovers both at home and abroad as its modular,analysis and debugging easily,platform independent intermediate representation.This paper focus on LLVM's function inlining optimization technology.The origin function inline model of LLVM is according by the size of Caller and Callee,that is if the Cost of Caller and Callee is not greater than Threshold,inline the Callee,whereas not inline it.Based on original function inlining model,this paper propose NFC model considering the number of function calls and BLF model considering benefit for loop fusion.NFC tells that inlining a function which called many times can reduce more extra consumption caused by calling the function.BLF tells that if the model,which to be dealed with loop fusion,created by inlining a function,then inlining the function would provide opportunity for loop fusion.In a word,The original function inlining model of LLVM are improved by NFC and BLF in two aspects,which are reducing the consumption of calling functions and increasing the subsequent optimizations.The test platforms used in this paper are EPCM-505 C and PC,and the test sets are SPEC CPU2000 and LLVM test-suites.The experimental results show that,under the effect of the two models in this paper,the average efficiency of the program perfomance are improved by 1.52% and 1.82%,The smaller volume of a function,and the more hardware resources of platform,the better inlining the function.
Keywords/Search Tags:function inlining, LLVM, inline model, NFC, BFL
PDF Full Text Request
Related items