期刊文献+

基于LLVM的函数内联优化技术研究

Study on function inlining optimization technologies based on LLVM
下载PDF
导出
摘要 函数内联(Function Inlining)是使用函数体代替函数调用的一种编译优化技术。LLVM中原生的内联模型只根据函数体的大小来判断函数内联与否,而没有考虑函数的调用次数和后续的优化。针对这个问题,提出了基于函数调用次数(NFC)和考虑后续循环合并(BLF)的新内联模型。首先,通过NFC模型对被多次调用的函数进行内联,进而减少更多因函数调用而产生的额外消耗。其次,通过BLF模型能够识别出进行内联后可以进一步进行循环合并优化的函数,为后续循环合并优化提供支持。实验结果表明,提出的函数内联优化技术是可行的,测试程序平均加速比为1.52%。 Function inlining is a compile optimization technique,that is using the body of a function instead of the callsite.LLVM’s original inline model considers the factor of the size of the function,but not considers the factor of executionfrequency and potential optimization opportunities.In this paper,a new inline model,considers both execution frequencyand potential optimization opportunities,proposed to avoid drawbacks of original inline model.The NFC model,can reduce consumption generated by calling more function calls,by inlining functions repeatedly called.The BLF modelprovides supports for the subsequent optimization for loop fusion,by inlining functions.In the experiment,function inliningoptimization model proposed by this paper is effective.Average speedup ratio of test program is1.52%.
作者 郭振华 吴艳霞 安龙飞 张国印 卢文祥 GUO Zhenhua;WU Yanxia;AN Longfei;ZHANG Guoyin;LU Wenxiang(College of Computer Science and Technology, Harbin Engineering University, Harbin 150001, China)
出处 《计算机工程与应用》 CSCD 北大核心 2017年第3期41-46,共6页 Computer Engineering and Applications
基金 国家自然科学基金(No.61003036) 计算机体系结构国家重点实验室开放课题(No.CARCH201301) 中央高校基本科研业务经费(No.HEUCF100606)
关键词 编译优化 函数内联 调用次数 循环合并 加速比 compiler optimization function inline Number of Function be Called(NFC) Benefit for Loop Fusion (BLF) speedup
  • 相关文献

参考文献1

二级参考文献11

  • 1汤伟,吴承勇,张兆庆.面向IXP网络处理器的内联优化[J].计算机科学,2006,33(4):250-252. 被引量:1
  • 2Open Research Compiler for Itanium Processor Family[OL].http://ipf-orc sourceforge.net,2005-09-28.
  • 3J Ng,D Kulkarni,W Li,et al.Inter-procedural loop fusion,array contraction and rotation[C].The 12th Int'l Conf on Parallel Architectures and Compilation Techniques,New Orleans,LA,2003.
  • 4C Barton,J N Amaral,B Blainey.Should potential loop optimizations influence inlining decisions[C].The 2003 Conf of the Centre for Advanced Studies on Collaborative Research,Toronto,Ontario,Canada,2003.
  • 5P Zhao,J N Amaral.To inline or not to inline? Enhanced inlining decisions[C].The 16th Int'l Workshops on Languages and Compilers for Parallel Computing,Texas,2003.
  • 6K D Cooper,T J Harvey,T Waterman.Adaptive inlining[C].The 2005 Symp of the Los Alamos Computer Science Institute,Rice University,2005.
  • 7J Cavazos,M F P O'Boyle.Automatic tuning of inlining heuristics[C].SC 05,Seattle,WA,2005.
  • 8D R Chakrabarti,S-M Liu.Inline analysis:Beyond selection heuristics[C].The Int'l Symp on Code Generation and Optimization 2006,New York,2006.
  • 9K Hazelwood,D Grove.Adaptive online context-sensitive inlining[C].The Int'l Symp on Code Generation and Optimization 2003,San Francisco,2003.
  • 10D R Chakrabarti,L A Lozano,X D Li,et al.Scalable high performance cross-module inlining[C].The 13th Int'l Conf on Parallel Architecture and Compilation Techniques,Antibes Juanles-Pins.2004.

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部