Language-parametric compiler validation with application to LLVM
Language-parametric compiler validation with application to LLVM
复制标题
语言参数编译器验证及其应用于 LLVM
DOI:
--
复制
发表时间:
2021
期刊:
影响因子:
--
通讯作者:
Grigore Roşu
中科院分区:
文献类型:
--
作者:
T. Kasampalis;D. Park;Zhengyao Lin;Vikram S. Adve;Grigore Roşu
We propose a new design for a Translation Validation (TV) system geared towards practical use with modern optimizing compilers, such as LLVM. Unlike existing TV systems, which are custom-tailored for a particular sequence of transformations and a specific, common language for input and output programs, our design clearly separates the transformation-specific components from the rest of the system, and generalizes the transformation-independent components. Specifically, we present Keq, the first program equivalence checker that is parametric to the input and output language semantics and has no dependence on the transformation between the input and output programs. The Keq algorithm is based on a rigorous formalization, namely cut-bisimulation, and is proven correct. We have prototyped a TV system for the Instruction Selection pass of LLVM, being able to automatically prove equivalence for translations from LLVM IR to the MachineIR used in compiling to x86-64. This transformation uses different input and output languages, and as such has not been previously addressed by the state of the art. An experimental evaluation shows that Keq successfully proves correct the translation of over 90% of 4732 supported functions in GCC from SPEC 2006.