LocSeq: Automated Localization for Compiler Optimization Sequence Bugs of LLVM

LocSeq: Automated Localization for Compiler Optimization Sequence Bugs of LLVM
复制标题

LocSeq:LLVM 编译器优化序列错误的自动本地化

DOI:
--
复制
发表时间:
2022
影响因子:
5.9
通讯作者:
Lei Qiao
Lei Qiao
中科院分区:
计算机科学2区
文献类型:
--
作者:
Zhide Zhou;He Jiang;Zhilei Ren;Yuting Chen;Lei Qiao

文献摘要

被引文献

相似文献

当程序使用优化序列进行优化时,可能会触发程序错误。然而,诊断编译器优化序列错误是困难的,由于有限的调试信息。虽然一些技术(例如,DiWi和RecBi)已经被提出来自动定位编译器错误,还没有进行系统的工作来自动定位编译器优化序列错误。在这篇文章中,我们提出了LocSeq,这是一种自动定位LLVM编译器优化序列错误的新技术。LocSeq的核心见解是基于这样一个事实,即优化的行为可能会相互影响,因此,可以通过构造无错误的优化序列来排除无辜的文件。首先,给定一个引发编译器bug的bug优化序列,在LocSeq中,我们将bug优化序列的定位问题转化为无bug优化序列的构造问题,这有助于bug编译器文件的定位。然后,在LocSeq中提出了一种约束遗传算法,以生成一组无错误的优化序列,这些序列与有错误的优化序列共享相似的编译器执行轨迹。最后,LocSeq利用基于频谱的错误定位技术,通过比较无错误的优化序列和有错误的优化序列之间的执行轨迹来定位编译器优化序列错误。为了评估LocSeq的有效性,我们建立了一个基准测试,包括LLVM的60个优化序列错误,并将LocSeq与最先进的技术DiWi和RecBi进行比较。实验结果表明,LocSeq显著优于DiWi和RecBi,分别高达366.66%/72.27%和250.00%/56.00%,用于定位Top-1/5文件中的优化序列错误。
Compiler bugs may be triggered when programs are optimized with optimization sequences. However, diagnosing compiler optimization sequence bugs is difficult due to limited debugging information. Although some techniques (e.g., DiWi and RecBi) have been proposed to automatically localize compiler bugs, no systematic work has been conducted to automatically localize compiler optimization sequence bugs. In this article, we propose LocSeq, a novel technique to automatically localize compiler optimization sequence bugs of LLVM. The core insight of LocSeq is based on the fact that the behaviors of optimizations may be influenced by each other, and thus, the innocent files may be excluded by constructing bug-free optimization sequences. First, given a buggy optimization sequence that triggers a compiler bug, in LocSeq, we transform the problem of the localization for a compiler optimization sequence bug to the problem of the construction for bug-free optimization sequences, which are helpful to localize buggy compiler files. Then, a constrained genetic algorithm is presented in LocSeq to generate a set of bug-free optimization sequences that share similar compiler execution traces with the buggy optimization sequence. Finally, LocSeq leverages a spectrum-based bug localization technique to localize the compiler optimization sequence bug by comparing the execution traces between bug-free optimization sequences and the buggy optimization sequence. To evaluate the effectiveness of LocSeq, we build a benchmark, including 60 optimization sequence bugs of LLVM, and compare LocSeq with the state-of-the-art techniques DiWi and RecBi. The experimental results show that LocSeq significantly outperforms DiWi and RecBi by up to 366.66%/72.27% and 250.00%/56.00% for localizing optimization sequence bugs within Top-1/5 files, respectively.