当前位置: X-MOL 学术J. Syst. Softw. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
More precise construction of static single assignment programs using reaching definitions
Journal of Systems and Software ( IF 3.7 ) Pub Date : 2020-08-01 , DOI: 10.1016/j.jss.2020.110590
Abu Naser Masud , Federico Ciccozzi

Abstract The Static Single Assignment (SSA) form is an intermediate representation used for the analysis and optimization of programs in modern compilers. The ϕ-function placement is the most computationally expensive part of converting any program into its SSA form. The most widely-used ϕ-function placement algorithms are based on computing dominance frontiers (DF). However, this kind of algorithms works under the limiting assumption that all variables are defined at the beginning of the program, which is not the case for local variables. In this paper, we introduce an innovative ϕ-placement algorithm based on computing reaching definitions (RD), which generates a precise number of ϕ-functions. We provided theorems and proofs showing the correctness and the theoretical computational complexity of our algorithms. We implemented our approach and a well-known DF-based algorithm in the Clang/LLVM compiler framework, and performed experiments on a number of benchmarks. The results show that the limiting assumption of the DF-based algorithm when compared with the more accurate results of our RD-based approach leads to generating up to 87% (69% on average) superfluous ϕ-functions on all benchmarks, and thus brings about a significant precision loss. Moreover, even though our approach computes more information to generate precise results, it is able to analyze up to 92.96% procedures (65.63% on average) of all benchmarks with execution time within twice the execution time of the reference DF-based approach.

中文翻译:

使用到达定义更精确地构建静态单一分配程序

摘要 静态单赋值 (SSA) 形式是一种中间表示,用于在现代编译器中分析和优化程序。将任何程序转换为其 SSA 形式时,φ 函数放置是计算量最大的部分。最广泛使用的 ϕ 函数放置算法基于计算优势前沿 (DF)。然而,这种算法在有限的假设下工作,即所有变量都在程序开始时定义,局部变量不是这种情况。在本文中,我们介绍了一种基于计算到达定义 (RD) 的创新 ϕ-placement 算法,该算法生成精确数量的 ϕ-function。我们提供了定理和证明,证明了我们算法的正确性和理论计算复杂性。我们在 Clang/LLVM 编译器框架中实现了我们的方法和著名的基于 DF 的算法,并在许多基准测试中进行了实验。结果表明,与我们基于 RD 的方法的更准确结果相比,基于 DF 的算法的限制假设导致在所有基准上生成高达 87%(平均 69%)的多余 ϕ 函数,从而带来关于显着的精度损失。此外,即使我们的方法计算更多信息以生成精确结果,它也能够分析高达 92.96%(平均 65.63%)的所有基准程序,其执行时间是基于 DF 的参考方法的执行时间的两倍。结果表明,与我们基于 RD 的方法的更准确结果相比,基于 DF 的算法的限制假设导致在所有基准上生成高达 87%(平均 69%)的多余 ϕ 函数,从而带来关于显着的精度损失。此外,即使我们的方法计算更多信息以生成精确结果,它也能够分析高达 92.96%(平均 65.63%)的所有基准程序,其执行时间是基于 DF 的参考方法的执行时间的两倍。结果表明,与我们基于 RD 的方法的更准确结果相比,基于 DF 的算法的限制假设导致在所有基准上生成高达 87%(平均 69%)的多余 ϕ 函数,从而带来关于显着的精度损失。此外,即使我们的方法计算更多信息以生成精确结果,它也能够分析高达 92.96%(平均 65.63%)的所有基准程序,其执行时间是基于 DF 的参考方法的执行时间的两倍。
更新日期:2020-08-01
down
wechat
bug