Acta Scientiarum Naturalium Universitatis Pekinensis

Previous Articles     Next Articles

A Profit-Driven Algorithm for Semantic Code Motion

NIE Jiutao, CHENG Xu   

  1. Microprocessor Research and Development Center, Peking University, Beijing 100871;
  • Received:2008-10-07 Online:2009-07-20 Published:2009-07-20



  1. 北京大学微处理器研究开发中心,北京100871;

Abstract: The potential reasons of negative effects of aggressive code motion were analyzed. The authors built the profit model and proposed a profit-driven semantic code motion algorithm, which determined if an existing result should be reused. The new algorithm was i mplemented in GCC-4.2.0. The experimental results achieved from SPEC2000 on an X86 machine show that the code generated by the GCC using the new algorithmis 6.8% and 2.6% faster on average than that using semantic code motion and that using the GCCs original code motion algorithm GVNPRE .

Key words: profit-driven, partial redundancy elimination, semantic code motion

摘要: 分析了激进的冗余消除产生负面影响的原因,采纳了收益驱动的思想,即建立收益模型,根据收益评估结果来决定是否重用已有的计算结果,提出了一种收益驱动的语义代码移动算法。该算法在GCC-4.2.0 中实现。在X86上对SPEC2000的测试结果表明,采用该算法的编译器生成的代码比采用没有收益驱动的语义代码移动算法和采用GCC自己的GVNPRE算法平均性能分别提高了6.8%和2.6%。

关键词: 收益驱动, 部分冗余消除, 语义代码移动

CLC Number: