面向编译优化结果不一致的代码高效定位
CSTR:
作者:
作者单位:

作者简介:

通讯作者:

中图分类号:

TP311

基金项目:

国家重点研发计划(2023YFB3001600); 国家自然科学基金(62272471, 62202488)


Efficient Localization for Codes Causing Compilation Optimization-induced Result Inconsistency
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    编译器是程序开发人员最依赖的性能优化工具之一. 然而, 受限于浮点数有限精度编码问题, 很多编译优化选项会改变浮点计算的语义, 进而导致程序计算结果不一致. 定位程序中导致编译优化结果不一致的语句对于程序性能优化和结果可复现具有重要意义. 当前最先进的方法PLiner采用基于语句精度增强的二分搜索来定位导致编译优化结果不一致的代码段, 受限于对多源问题代码的定位支持不够和搜索效率不高问题. 提出一种浮点指令差异性引导的Delta调试定位方法FI3D, 利用Delta调试中的回溯机制更好地支持多源问题代码定位, 基于不同编译优化选项下函数浮点指令序列的差异性来引导定位. 使用NPB基准测试集中的6个应用、GSL数学库中的10个程序和floatsmith混合精度测试集中的2个程序对FI3D进行了评测, 实验结果显示FI3D能够成功定位PLiner失效的4个测试用例, 且对PLiner成功定位的14个测试用例获得了平均26.8%的性能提升.

    Abstract:

    The compiler is one of the most relied-upon performance tuning tools for program developers. However, due to the limited precision encoding of floating-point numbers, many compiler optimization options can alter the semantics of floating-point calculations, leading to result inconsistency. Locating the program statements that cause compilation optimization-induced result inconsistency is crucial for performance tuning and result reproducibility. The state-of-the-art approach employs precision enhancement-based binary search to locate the code snippets causing result inconsistency but suffers from insufficient support for multi-source localization and low search efficiency. This study proposes a floating-point instruction difference-guided Delta-Debugging localization method, FI3D, which utilizes the backtracking mechanism in Delta-Debugging to better support multi-source problem code localization and exploits the differences in floating-point instruction sequences under different compiler optimization options to guide the localization. FI3D is evaluated using 6 applications from the NPB benchmark, 10 programs from the GNU scientific library, and 2 programs from the floatsmith mixed-precision benchmark. Experimental results demonstrate that FI3D successfully locates the 4 applications where PLiner fails and achieves an average 26.8% performance improvement for the 14 cases successfully located by PLiner.

    参考文献
    相似文献
    引证文献
引用本文

于恒彪,易昕,范小康,唐滔,黄春,尹帮虎,王戟.面向编译优化结果不一致的代码高效定位.软件学报,,():1-15

复制
相关视频

分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2024-09-23
  • 最后修改日期:2024-12-25
  • 录用日期:
  • 在线发布日期: 2025-06-04
  • 出版日期:
文章二维码
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京市海淀区中关村南四街4号,邮政编码:100190
电话:010-62562563 传真:010-62562533 Email:jos@iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号