An SSA-based Algorithm for Optimal Speculative Code Motion under an Execution Profile

被引:2
|
作者
Zhou, Hucheng [1 ]
Chen, Wenguang [1 ]
Chow, Fred
机构
[1] Tsinghua Univ, Beijing 100084, Peoples R China
关键词
Algorithms; Design; Experimentation; Measurement; Performance; Theory; Code motion; Flow network; Minimum cut; Partial redundancy elimination; Profiling; Speculation; Static single assignment;
D O I
10.1145/1993316.1993510
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
To derive maximum optimization benefits from partial redundancy elimination (PRE), it is necessary to go beyond its safety constraint. Algorithms for optimal speculative code motion have been developed based on the application of minimum cut to flow networks formed out of the control flow graph. These previous techniques did not take advantage of the SSA form, which is a popular program representation widely used in modern-day compilers. We have developed the MC-SSAPRE algorithm that enables an SSA-based compiler to take full advantage of SSA to perform optimal speculative code motion efficiently when an execution profile is available. Our work shows that it is possible to form flow networks out of SSA graphs, and the min-cut technique can be applied equally well on these flow networks to find the optimal code placement. We provide proofs of the correctness and computational and lifetime optimality of MC-SSAPRE. We analyze its time complexity to show its efficiency advantage. We have implemented MC-SSAPRE in the open-sourced Path64 compiler. Our experimental data based on the full SPEC CPU2006 Benchmark Suite show that MC-SSAPRE can further improve program performance over traditional SSAPRE, and that our sparse approach to the problem does result in smaller problem sizes.
引用
收藏
页码:98 / 108
页数:11
相关论文
共 50 条