上海交通大学学报(自然版) ›› 2013, Vol. 47 ›› Issue (01): 133-137.

• 自动化技术、计算机技术 • 上一篇    下一篇

一种基于代码隔离的大程序迭代编译优化方法

陆平静, 李宝, 车永刚, 庞征斌   

  1. (国防科学技术大学 计算机学院, 长沙 410073)
  • 收稿日期:2012-05-30 出版日期:2013-01-30 发布日期:2013-01-30
  • 基金资助:

    国家自然科学基金项目(61103014, 61170046, 61003075),国家重点基础研究发展规划(973)项目 (G2009CB723803),国家高技术研究发展计划(863)项目(2012AA01A301)资助

Code Isolation Based Iterative Compilation Optimization for Large Programs

 LU  Ping-Jing, LI  Bao, CHE  Yong-Gang, PANG  Zheng-Bin   

  1. (College of Computer, National University of Defense Technology, Changsha 410073, China)
  • Received:2012-05-30 Online:2013-01-30 Published:2013-01-30

摘要: 提出了一种轻权的大程序优化方法——基于代码隔离的迭代编译优化方法,并采用该方法对程序的性能进行测试,结合代码隔离技术,从大程序中分离若干以循环结构为主、性能不相关或相关度较低的核心代码片断,逐个对其进行迭代编译优化搜索,进而更加有效地优化核心代码段.结果表明,所提出的方法可以提高整个程序的性能,可将一个高维的优化空间转换为多个低维优化空间而降低迭代编译的优化开销,是一种易于实现且适合通用代码迭代编译的大程序优化方法.    

关键词: 迭代编译, 代码隔离, 程序优化

Abstract: A lightweight large programs optimization method, code isolation based iterative compilation was proposed, which isolated kernel code segments from original scientific and engineering codes, organized them into source files, and then optimized these isolated codes using iterative compilation separately. In this way, different kernel code segments could be optimized with specific optimization configuration; therefore, it optimized programs more effectively and boosted the whole programs’ performance. Meanwhile, the multi-dimensional optimization space was split into several lower-dimensional optimization spaces, and the optimization cost was reduced. The experimental results show that it is a low-weight and easy-to-implement method for large programs, and it is also suitable for general code optimization.  

Key words: iterative compilation, code isolation, program optimization

中图分类号: