Control-flow graphs (CFGs) of structured programs are well known to exhibit strong sparsity properties. Traditionally, this sparsity has been modeled using graph parameters such as treewidth and pathwidth, enabling the development of faster parameterized algorithms for tasks in compiler optimization, model checking, and program analysis. However, these parameters only approximate the structural constraints of CFGs: although every structured CFG has treewidth at most~7, many graphs with treewidth at most~7 cannot arise as CFGs. As a result, existing parameterized techniques are optimized for a substantially broader class of graphs than those encountered in practice. In this work, we introduce a new grammar-based decomposition framework that characterizes \emph{exactly} the class of control-flow graphs generated by structured programs. Our decomposition is intuitive, mirrors the syntactic structure of programs, and remains fully compatible with the dynamic-programming paradigm of treewidth-based methods. Using this framework, we design improved algorithms for two classical compiler optimization problems: \emph{Register Allocation} and \emph{Lifetime-Optimal Speculative Partial Redundancy Elimination (LOSPRE)}. Extensive experimental evaluation demonstrates significant performance improvements over previous state-of-the-art approaches, highlighting the benefits of using decompositions tailored specifically to CFGs.


翻译:结构化程序的控制流图(CFG)具有显著的稀疏性,这一特性已广为人知。传统上,这种稀疏性通常通过树宽和路径宽等图参数来建模,从而为编译器优化、模型检验和程序分析等任务开发更快的参数化算法。然而,这些参数仅能近似描述控制流图的结构约束:尽管所有结构化控制流图的树宽至多为7,但许多树宽不超过7的图并不能作为实际的控制流图出现。因此,现有的参数化技术所优化的图类远超出实践中遇到的图类范围。本文提出了一种新的基于文法的分解框架,该框架能够精确刻画由结构化程序生成的控制流图类。我们的分解方法直观,反映了程序的语法结构,并且完全兼容基于树宽方法的动态规划范式。利用该框架,我们针对两个经典的编译器优化问题——寄存器分配和生命周期最优的推测性部分冗余消除(LOSPRE)——设计了改进算法。大量实验评估表明,相较于以往最先进的方法,我们的方法在性能上取得了显著提升,这凸显了使用专门针对控制流图设计的分解方法的优势。

0
下载
关闭预览

相关内容

【博士论文】利用图结构加速稀疏计算
专知会员服务
18+阅读 · 2025年3月6日
【干货书】系统与控制的稀疏性方法,214页pdf
专知会员服务
40+阅读 · 2023年5月19日
专知会员服务
28+阅读 · 2021年9月4日
图节点嵌入(Node Embeddings)概述,9页pdf
专知
15+阅读 · 2020年8月22日
图分类:结合胶囊网络Capsule和图卷积GCN(附代码)
中国人工智能学会
36+阅读 · 2019年2月26日
专栏 | 深入理解图注意力机制
机器之心
25+阅读 · 2019年2月19日
基于注意力机制的图卷积网络
科技创新与创业
74+阅读 · 2017年11月8日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关资讯
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员