Constant Propagation in a Hierarchical Intermediate Program Representation

M. Giordano, M. Furnari, Renata Napolitano, Antonio Spagnolo
{"title":"Constant Propagation in a Hierarchical Intermediate Program Representation","authors":"M. Giordano, M. Furnari, Renata Napolitano, Antonio Spagnolo","doi":"10.1142/S0129053399000089","DOIUrl":null,"url":null,"abstract":"A crucial problem in parallelizing compiler design is the choice of a suitable Intermediate Representation (IR) to make parallelism detection and extraction easy and possible. Dependence graphs have long been recognized as useful tools for this aim. Several versions were proposed [1,4,6,20], which encapsulate relations of data dependence, control dependence or both. They were also used in conventional optimizations, but always coupled with the traditional Control Flow Graph (CFG). However, it would be preferable to apply both conventional and parallelizing optimizations to the same IR. Recently, some attempts were made to use dependence graphs as a unifying framework on which all types of optimization [4] are applied. This is one of the aims of our work in this research area. We started working on the well known Hierarchical Task Graph (HTG) of Polychronopoulos and Girkar [6,7,8]. The HTG, by definition, is an acyclic and then a reducible graph. In fact it is built from a CFG arranged hierarchically around loops with all loop back edges removed. This CFG is then enriched with control and data dependence information (edges). Our proposal is an extension of the HTG, named Extended Hierarchical Task Graph (EHTG), that is a HTG where data dependence edges are annotated with a boolean branch path expression indicating the CFG paths through which the data dependences are established. We developed two algorithms of constant propagation (used for dead code elimination) running directly on our EHTG without using the traditional CFG. The two algorithms can be applied only to sequential programs whose parallelism is represented by the HTG structure. They are not suited to perform constant propagation on explicitly parallel programs [12]. Complexity and correctness of the algorithms are analyzed and we also prove that one of them has the same complexity and finds the same class of constants as the well known Wegman & Zadeck constant propagation algorithm [20], that uses a hybrid sparse representation.","PeriodicalId":270006,"journal":{"name":"Int. J. High Speed Comput.","volume":"5 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1999-06-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Int. J. High Speed Comput.","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1142/S0129053399000089","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

A crucial problem in parallelizing compiler design is the choice of a suitable Intermediate Representation (IR) to make parallelism detection and extraction easy and possible. Dependence graphs have long been recognized as useful tools for this aim. Several versions were proposed [1,4,6,20], which encapsulate relations of data dependence, control dependence or both. They were also used in conventional optimizations, but always coupled with the traditional Control Flow Graph (CFG). However, it would be preferable to apply both conventional and parallelizing optimizations to the same IR. Recently, some attempts were made to use dependence graphs as a unifying framework on which all types of optimization [4] are applied. This is one of the aims of our work in this research area. We started working on the well known Hierarchical Task Graph (HTG) of Polychronopoulos and Girkar [6,7,8]. The HTG, by definition, is an acyclic and then a reducible graph. In fact it is built from a CFG arranged hierarchically around loops with all loop back edges removed. This CFG is then enriched with control and data dependence information (edges). Our proposal is an extension of the HTG, named Extended Hierarchical Task Graph (EHTG), that is a HTG where data dependence edges are annotated with a boolean branch path expression indicating the CFG paths through which the data dependences are established. We developed two algorithms of constant propagation (used for dead code elimination) running directly on our EHTG without using the traditional CFG. The two algorithms can be applied only to sequential programs whose parallelism is represented by the HTG structure. They are not suited to perform constant propagation on explicitly parallel programs [12]. Complexity and correctness of the algorithms are analyzed and we also prove that one of them has the same complexity and finds the same class of constants as the well known Wegman & Zadeck constant propagation algorithm [20], that uses a hybrid sparse representation.
分层中间程序表示中的常数传播
并行化编译器设计的一个关键问题是选择合适的中间表示(IR),使并行性检测和提取变得容易和可能。长期以来,依赖性图一直被认为是实现这一目标的有用工具。提出了几个版本[1,4,6,20],它们封装了数据依赖关系,控制依赖关系或两者兼而有之。它们也用于传统的优化,但总是与传统的控制流图(CFG)相结合。然而,最好对同一IR同时应用常规优化和并行优化。最近,一些尝试使用依赖图作为统一的框架,所有类型的优化应用[4]。这是我们在这个研究领域工作的目标之一。我们开始研究Polychronopoulos和Girkar[6,7,8]的分层任务图(Hierarchical Task Graph, HTG)。根据定义,HTG是一个无环图,然后是一个可约图。事实上,它是建立从CFG分层排列周围的环路与所有环路后边缘被删除。然后用控制和数据依赖信息(边)丰富这个CFG。我们的建议是HTG的扩展,命名为扩展分层任务图(EHTG),这是一个HTG,其中数据依赖边用布尔分支路径表达式注释,指示通过CFG路径建立数据依赖。我们开发了两种恒定传播算法(用于消除死码),直接运行在我们的EHTG上,而不使用传统的CFG。这两种算法只适用于并行性由HTG结构表示的顺序程序。它们不适合在显式并行程序上执行恒定传播[12]。分析了算法的复杂度和正确性,并证明了其中一种算法与使用混合稀疏表示的著名的Wegman & Zadeck常数传播算法[20]具有相同的复杂度和找到相同的一类常数。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信