节点文献

代码优化与指令调度的集成

Integrating Code Optimization and Instruction Scheduling

  • 推荐 CAJ下载
  • PDF下载
  • 不支持迅雷等下载工具,请取消加速工具后下载。

【作者】 连瑞琦; 吴承勇; 张兆庆;

【Author】 LIAN Rui Qi WU Cheng Yong ZHANG Zhao Qing (Institute of Computing Technology, Chinese Academy of Sciences, Beijing 100080)

【机构】 中国科学院计算技术研究所!北京100080;

【摘要】 在开发指令级并行性的编译器中 ,如果代码优化和指令调度各自独立进行 ,将导致代码优化效果的下降甚至产生副作用 .文中针对这一问题 ,提出了代码优化和指令调度集成的思想 .在此思想的基础上 ,介绍了一个适合于代码优化集成的指令调度算法框架 ;并从优化的有效性、是否可逆和优化机会的产生等方面进行了分析 ,选出了适合集成入指令调度的传统优化种类 ;最后给出了这些优化的具体集成方法 .该文提出的方法已经在一个指令级并行编译器上进行了实验 ,实验数据证明 ,这种优化集成方法能使优化的效果明显改善

【Abstract】 In the compilers to exploit instruction level parallelism, code optimization applied separately with instruction scheduling will not lead to an ideal result or even generate negative effect. In this paper, the idea of integrating the code optimization and instruction scheduling is put forward in this paper. Based on the idea, we first introduce a framework that is suitable for the integration of code optimization and instruction scheduling. In the framework, instruction scheduling and register allocation are cooperative, which is good for optimizer to know the usage of functional resources and registers, and the computation of ready operations is changed to a data flow problem, which makes the instruction scheduling easy to be integrated with code optimization which is also a data flow problem. Then, to integrate all proper code optimizations into instruction scheduling properly, we analyze all kinds of traditional code optimizations carefully. As a result, we picked out the optimization types, which are suitable to be integrated, by considering the aspects of efficiency, reversibility and opportunity of optimizations. They are copy propagation, common sub expression elimination and DAG transformation. Finally, the detailed methods to integrate the selected optimizations are given. In those methods, we mainly focus on two aspects: the profitability checking and the selection of optimization candidates. In detail, we apply a kind of optimization only when it will not heaven the pressure of functional resources and registers, which avoids the negative effect of optimizations, and we combine the selection of the optimization candidates with the computation of ready operations, which shortens the time cost by compiler. All methods in this paper have been implemented in an instruction level parallel compiler. According to the result of experiments, this method can improve the performance of code optimization obviously. For the result of 24 livermore kernels, most of them can get speedup of 1.5—2.4 over the instruction scheduling without being combined with code optimization.

【基金】 国家自然科学基金 (6993 3 0 2 0 )
  • 【文献出处】 计算机学报 ,Chinese Journal of Computers , 编辑部邮箱 ,2001年07期
  • 【分类号】TP314
  • 【被引频次】12
  • 【下载频次】269
节点文献中: