Given a value computed within a program, an idempotent backward slice with respect to this value is a maximal subprogram that computes it. An informal notion of an idempotent slice has previously been used by Guimaraes et al. to transform eager into strict evaluation in the LLVM intermediate representation. However, that algorithm is insufficient to be correctly applied to general control-flow graphs. This paper addresses these omissions by formalizing the notion of idempotent backward slices and presenting a sound and efficient algorithm for extracting them from programs in Gated Static Single Assignment (GSA) form. As an example of their practical use, the paper describes how identifying and extracting idempotent backward slices enables a sparse code-size reduction optimization; that is, one capable of merging non-contiguous sequences of instructions within the control-flow graph of a single function or across functions. Experiments with the LLVM test suite show that, in specific benchmarks, this new algorithm achieves code-size reductions up to -7.24% on programs highly optimized by the -Os sequence of passes from clang 17.


翻译:给定程序中计算的某个值,关于该值的幂等后向切片是计算该值的最大子程序。Guimaraes等人先前在LLVM中间表示中将急切求值转换为严格求值时,曾使用过幂等切片的非形式化概念。然而,该算法不足以正确应用于一般控制流图。本文通过形式化幂等后向切片的概念,并提出一种从门控静态单赋值形式程序中提取幂等切片的可靠高效算法,以解决上述不足。作为其实际应用的示例,本文阐述了如何通过识别和提取幂等后向切片实现稀疏代码规模缩减优化;该优化能够合并单个函数内或跨函数控制流图中的非连续指令序列。在LLVM测试套件上的实验表明,在特定基准测试中,对于经过clang 17的-Os编译序列高度优化的程序,该新算法可实现高达-7.24%的代码规模缩减。

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
【ICML 2024】零阶优化器微调大模型,大幅降低内存
专知会员服务
32+阅读 · 2024年7月8日
【伯克利博士论文】规模化教大型语言模型使用工具
专知会员服务
29+阅读 · 2024年5月11日
《用于代码弱点识别的 LLVM 中间表示》CMU
专知会员服务
14+阅读 · 2022年12月12日
简述多种降维算法
算法与数学之美
11+阅读 · 2018年9月23日
超全总结:神经网络加速之量化模型 | 附带代码
一文读懂图像压缩算法
七月在线实验室
17+阅读 · 2018年5月2日
如何设计基于深度学习的图像压缩算法
论智
41+阅读 · 2018年4月26日
动手写机器学习算法:SVM支持向量机(附代码)
七月在线实验室
12+阅读 · 2017年12月5日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Arxiv
0+阅读 · 3月2日
VIP会员
最新内容
国外反无人机系统与技术动态
专知会员服务
0+阅读 · 8分钟前
大规模作战行动中的战术作战评估(研究论文)
专知会员服务
0+阅读 · 35分钟前
未来的海战无人自主系统
专知会员服务
0+阅读 · 51分钟前
美军多域作战现状分析:战略、概念还是幻想?
专知会员服务
0+阅读 · 今天11:52
无人机与反无人机系统(书籍)
专知会员服务
13+阅读 · 今天6:45
美陆军2026条令:安全与机动支援
专知会员服务
3+阅读 · 今天5:49
技术、多域威慑与海上战争(报告)
专知会员服务
8+阅读 · 4月13日
相关资讯
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员