周 谦 冯晓兵 张兆庆. 循环合并敏感的优化内联模型[J]. 计算机研究与发展, 2007, 44(7): 1265-1271.
 引用本文: 周 谦 冯晓兵 张兆庆. 循环合并敏感的优化内联模型[J]. 计算机研究与发展, 2007, 44(7): 1265-1271.
Zhou Qian, Feng Xiaobing, and Zhang Zhaoqing. A Loop Fusion Conscious Inline Model[J]. Journal of Computer Research and Development, 2007, 44(7): 1265-1271.
 Citation: Zhou Qian, Feng Xiaobing, and Zhang Zhaoqing. A Loop Fusion Conscious Inline Model[J]. Journal of Computer Research and Development, 2007, 44(7): 1265-1271.

## A Loop Fusion Conscious Inline Model

• 摘要: 内联是编译器中的一种重要的优化手段.传统的编译器中内联模型只考虑函数的执行频率和大小，而没有考虑后面的优化.优化指导的内联模型是以考虑后面的优化为主而进行的内联，但它的缺点是没有考虑函数的执行频率和大小.为了克服以上两者的缺点，提出新的内联模型——循环合并敏感的优化内联模型，既考虑执行频率和函数大小，又考虑后面的优化.实现了考虑循环合并的内联，加入到ORC原有的内联模型中，自适应的建立新的内联模型，并对此模型进行性能调优.通过实验，发现热度这一内联标准在某些情况下不是很有效，并分析了原因，减少一些内联的函数，则会提高性能.实验的结果显示，新的内联模型可以有效地提高编译器的性能，某些SPEC CPU2000实例的peak性能有高达6%的性能提升，平均提升1%.

Abstract: Optimization directed inlining is a good direction for inlining, but it does not consider the factor of the execution frequency and size of the function. Although a traditional inlining model considers the factor of execution frequency and size of the function, it does not consider the optimization after inlining. In this paper, a new inline model, loop fusion conscious inline model, is proposed to avoid these drawbacks of the inline model of the past. It considers both execution frequency and size and optimization. The inlining mothod which only considers loop fusion is implemented and is added into the ORC's original inline model. Then the new inline model is built and the model is tuned for high performance. In the experiment, some fact is found that temperature (execution frequency) isn't effective in some cases, and the reason is analyzed. Experiment result shows that the new model can greatly improve the performance of the compiler, and some SPEC CPU 2000 benchmark's peak performance can increase as high as 6%, and 1% on average.

/

• 分享
• 用微信扫码二维码

分享至好友和朋友圈