CTOS: Compiler Testing for Optimization Sequences of LLVM
CTOS: Compiler Testing for Optimization Sequences of LLVM
复制标题
CTOS:LLVM 优化序列的编译器测试
DOI:
10.1109/tse.2021.3058671
复制
发表时间:
2021-02
期刊:
影响因子:
--
通讯作者:
Xiaochen Li
中科院分区:
文献类型:
--
作者:
He Jiang;Zhide Zhou;Zhilei Ren;Jingxuan Zhang;Xiaochen Li
Optimization sequences are often employed in compilers to improve the performance of programs, but may trigger critical compiler bugs, e.g., compiler crashes. Although many methods have been developed to automatically test compilers, no systematic work has been conducted to detect compiler bugs when applying arbitrary optimization sequences. To resolve this problem, two main challenges need to be addressed, namely the acquisition of representative optimization sequences and the selection of representative testing programs, due to the enormous number of optimization sequences and testing programs. In this study, we propose CTOS, a novel compiler testing method based on differential testing, for detecting compiler bugs caused by optimization sequences of LLVM. CTOS first leverages the technique Doc2Vec to transform optimization sequences into vectors to capture the information of optimizations and their orders simultaneously. Second, a method based on the region graph and call relationships is developed in CTOS to construct the vector representations of the testing program, such that the semantics and the structure information of programs can be captured simultaneously. Then, with the vector representations of optimization sequences and testing programs, a “centroid” based selection scheme is proposed to address the above two challenges. Finally, CTOS takes in the representative optimization sequences and testing programs as inputs, and tests each testing program with all the representative optimization sequences. If there is an output that is different from the majority of others of a given testing program, then the corresponding optimization sequence is deemed to trigger a compiler bug. Our evaluation demonstrates that CTOS significantly outperforms the baselines by up to <inline-formula><tex-math notation="LaTeX">$24.76\% \sim 50.57\%$</tex-math><alternatives><mml:math><mml:mrow><mml:mn>24</mml:mn><mml:mo>.</mml:mo><mml:mn>76</mml:mn><mml:mo>%</mml:mo><mml:mo>∼</mml:mo><mml:mn>50</mml:mn><mml:mo>.</mml:mo><mml:mn>57</mml:mn><mml:mo>%</mml:mo></mml:mrow></mml:math><inline-graphic xlink:href="jiang-ieq1-3058671.gif"/></alternatives></inline-formula> in terms of the bug-finding capability on average. Within seven month evaluations on LLVM, we have reported 104 valid bugs within 5 types, of which 21 have been confirmed or fixed. Most of those bugs are crash bugs (57) and wrong code bugs (24). 47 unique optimizations are identified to be faulty and 15 of them are loop related optimizations.
登录
查看更多内容
DOI:
10.1109/fccm.2019.00049
发表时间:
2019-01
期刊:
2019 IEEE 27th Annual International Symposium on Field-Programmable Custom Computing Machines (FCCM)
影响因子:
--
作者:
Qijing Huang;Ameer Haj-Ali;William S. Moses;J. Xiang;I. Stoica;K. Asanović;J. Wawrzynek
通讯作者:
Qijing Huang;Ameer Haj-Ali;William S. Moses;J. Xiang;I. Stoica;K. Asanović;J. Wawrzynek
DOI:
10.1145/2491956.2462173
发表时间:
2013-06
期刊:
Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation
影响因子:
--
作者:
Yang Chen;Alex Groce;Chaoqiang Zhang;Weng-Keen Wong;Xiaoli Z. Fern;E. Eide;J. Regehr
通讯作者:
Yang Chen;Alex Groce;Chaoqiang Zhang;Weng-Keen Wong;Xiaoli Z. Fern;E. Eide;J. Regehr
DOI:
10.1145/2771783.2771785
发表时间:
2015-07
期刊:
Proceedings of the 2015 International Symposium on Software Testing and Analysis
影响因子:
--
作者:
Vu Le;Chengnian Sun;Z. Su
通讯作者:
Vu Le;Chengnian Sun;Z. Su
DOI:
10.6028/nist.sp.800-142
发表时间:
2010-10
期刊:
--
影响因子:
--
作者:
D. R. Kuhn;R. Kacker;Yu Lei
通讯作者:
D. R. Kuhn;R. Kacker;Yu Lei
DOI:
10.1145/2628071.2628092
发表时间:
2014-08
期刊:
2014 23rd International Conference on Parallel Architecture and Compilation (PACT)
影响因子:
--
作者:
Jason Ansel;Shoaib Kamil;K. Veeramachaneni;Jonathan Ragan-Kelley;Jeffrey Bosboom;Una-May O’Reilly;
通讯作者:
Jason Ansel;Shoaib Kamil;K. Veeramachaneni;Jonathan Ragan-Kelley;Jeffrey Bosboom;Una-May O’Reilly;