arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1407.7932cs.PLcs.LO
收藏

并行程序的编译与执行优化

Specifying and Executing Optimizations for Parallel Programs

William Mansky, Dennis Griffith, Elsa L. Gunter

摘要:

编译器优化,通常表示为程序图上的重写,是所有现代编译器的核心部分。然而,即使是生产编译器也有bug,这些bug很难检测和解决。当编译并行程序时,问题只会变得更加复杂;从图形表示的选择到竞争条件的可能性,优化设计人员需要考虑一系列在处理单线程程序时不会出现的因素。在本文中,我们提出了PTRANS,一个特定领域的编译器转换的形式规格说明语言,并描述其可执行的语义。PTRANS的基本方法是将程序转换描述为带有时序逻辑边条件的控制流图上的重写。PTRANS的语法允许更清晰,更易于理解的程序优化规范;其可执行语义允许这些规范充当优化本身的原型,以便候选优化可以在继续将其包含在编译器中之前进行测试和改进。我们演示了使用PTRANS的状态,测试,并完善规范的冗余存储消除并行程序的优化。

英文摘要:

Compiler optimizations, usually expressed as rewrites on program graphs, are a core part of all modern compilers. However, even production compilers have bugs, and these bugs are difficult to detect and resolve. The problem only becomes more complex when compiling parallel programs; from the choice of graph representation to the possibility of race conditions, optimization designers have a range of factors to consider that do not appear when dealing with single-threaded programs. In this paper we present PTRANS, a domain-specific language for formal specification of compiler transformations, and describe its executable semantics. The fundamental approach of PTRANS is to describe program transformations as rewrites on control flow graphs with temporal logic side conditions. The syntax of PTRANS allows cleaner, more comprehensible specification of program optimizations; its executable semantics allows these specifications to act as prototypes for the optimizations themselves, so that candidate optimizations can be tested and refined before going on to include them in a compiler. We demonstrate the use of PTRANS to state, test, and refine the specification of a redundant store elimination optimization on parallel programs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑