Lexical-based partial redundancy elimination: An optimal algorithm with improved efficiency

IF 1.7 3区 计算机科学 Q3 COMPUTER SCIENCE, SOFTWARE ENGINEERING Journal of Computer Languages Pub Date : 2023-06-01 DOI:10.1016/j.cola.2023.101204
Reshma Roy, Vineeth Paleri
{"title":"Lexical-based partial redundancy elimination: An optimal algorithm with improved efficiency","authors":"Reshma Roy,&nbsp;Vineeth Paleri","doi":"10.1016/j.cola.2023.101204","DOIUrl":null,"url":null,"abstract":"<div><p>Partial redundancy elimination is a well-known optimization in compilers that eliminates the recomputation of equivalent expressions appearing on a path in a program. Morel and Renvoise, in their seminal paper, showed that it is a powerful optimization that subsumes two traditional optimizations, i.e., Common Subexpression Elimination and Loop Invariant Code Motion. Morel and Renvoise’s algorithm is not computationally optimal because partially redundant computations may remain even after the optimization. Later, Knoop et al. came up with an algorithm that is computationally and lifetime optimal. The algorithm by Knoop et al. takes four unidirectional data flow analyses to perform the transformation. Here, we propose a new algorithm for partial redundancy elimination, both computationally and lifetime optimal. The proposed algorithm is more efficient than other best-known algorithms since it takes only three unidirectional data flow analyses. We demonstrate the efficiency of the proposed algorithm by implementing it using the LLVM Compiler Infrastructure and comparing the time taken by the algorithm with other selected best-known algorithms. The proposed algorithm reported here is based on lexically equivalent expressions. However, we believe that the ideas in the proposed algorithm can find their use in the value-based approach.</p></div>","PeriodicalId":48552,"journal":{"name":"Journal of Computer Languages","volume":"75 ","pages":"Article 101204"},"PeriodicalIF":1.7000,"publicationDate":"2023-06-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Computer Languages","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S259011842300014X","RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0

Abstract

Partial redundancy elimination is a well-known optimization in compilers that eliminates the recomputation of equivalent expressions appearing on a path in a program. Morel and Renvoise, in their seminal paper, showed that it is a powerful optimization that subsumes two traditional optimizations, i.e., Common Subexpression Elimination and Loop Invariant Code Motion. Morel and Renvoise’s algorithm is not computationally optimal because partially redundant computations may remain even after the optimization. Later, Knoop et al. came up with an algorithm that is computationally and lifetime optimal. The algorithm by Knoop et al. takes four unidirectional data flow analyses to perform the transformation. Here, we propose a new algorithm for partial redundancy elimination, both computationally and lifetime optimal. The proposed algorithm is more efficient than other best-known algorithms since it takes only three unidirectional data flow analyses. We demonstrate the efficiency of the proposed algorithm by implementing it using the LLVM Compiler Infrastructure and comparing the time taken by the algorithm with other selected best-known algorithms. The proposed algorithm reported here is based on lexically equivalent expressions. However, we believe that the ideas in the proposed algorithm can find their use in the value-based approach.

查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
基于词法的部分冗余消除:一种提高效率的优化算法
部分冗余消除是编译器中一种众所周知的优化,它消除了对程序中路径上出现的等效表达式的重新计算。Morel和Renvoise在他们的开创性论文中表明,这是一种强大的优化,包含了两种传统的优化,即公共子表达式消除和循环不变代码运动。Morel和Renvoise的算法在计算上不是最优的,因为即使在优化之后也可能保留部分冗余计算。后来,Knoop等人提出了一种计算和寿命最优的算法。Knoop等人的算法采用四个单向数据流分析来执行转换。在这里,我们提出了一种新的部分冗余消除算法,它在计算和寿命上都是最优的。所提出的算法比其他最著名的算法更有效,因为它只需要三次单向数据流分析。我们通过使用LLVM编译器基础结构来实现所提出的算法,并将该算法所花费的时间与其他选定的最著名的算法进行比较,从而证明了该算法的有效性。本文提出的算法是基于词汇等价表达式的。然而,我们相信所提出的算法中的思想可以在基于价值的方法中得到应用。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
Journal of Computer Languages
Journal of Computer Languages Computer Science-Computer Networks and Communications
CiteScore
5.00
自引率
13.60%
发文量
36
期刊最新文献
Debugging in the Domain-Specific Modeling Languages for multi-agent systems GPotion: Embedding GPU programming in Elixir Near-Pruned single assignment transformation of programs MLAPW: A framework to assess the impact of feature selection and sampling techniques on anti-pattern prediction using WSDL metrics Editorial Board
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1