基于稀疏表示的Java数组边界检查消除

Keqiao Yang, Zeng Huang, Min Yang
{"title":"基于稀疏表示的Java数组边界检查消除","authors":"Keqiao Yang, Zeng Huang, Min Yang","doi":"10.1109/SERA.2009.11","DOIUrl":null,"url":null,"abstract":"As a type-safe program language, Java requires bounds checks of array accesses. Whenever an array element is accessed, a cmp (compare) instruction is executed to check whether the index value is within the valid bounds. Array bounds checks may prevent many useful optimizations because of precise exception. We present a new ABCE (Array Bounds Check Elimination) algorithm to eliminate redundant checks based on sparse representation for a Java static compiler. In contrast to other approaches performing in JVMs, we adhere to the design principle of the static compiler to optimize scientific Java applications. The algorithm is a light-weight algorithm working on an intermediate representation in Static Single Assignment form. It fully removes bounds checks if it can be proven that they never fail. Whenever possible, it moves bounds checks out of loops to reduce the total number of executed checks. If such a check fails, the executing program branches into the unmodified loop to preserve the exception semantics of Java. For the scientific SciMark 2.0 benchmark suite, this algorithm removes on average 76% of bounds check instructions. The evaluation shows a speedup near to the theoretical maximum for LU test case.","PeriodicalId":333607,"journal":{"name":"2009 Seventh ACIS International Conference on Software Engineering Research, Management and Applications","volume":"144 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2009-12-02","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Array Bounds Check Elimination for Java Based on Sparse Representation\",\"authors\":\"Keqiao Yang, Zeng Huang, Min Yang\",\"doi\":\"10.1109/SERA.2009.11\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"As a type-safe program language, Java requires bounds checks of array accesses. Whenever an array element is accessed, a cmp (compare) instruction is executed to check whether the index value is within the valid bounds. Array bounds checks may prevent many useful optimizations because of precise exception. We present a new ABCE (Array Bounds Check Elimination) algorithm to eliminate redundant checks based on sparse representation for a Java static compiler. In contrast to other approaches performing in JVMs, we adhere to the design principle of the static compiler to optimize scientific Java applications. The algorithm is a light-weight algorithm working on an intermediate representation in Static Single Assignment form. It fully removes bounds checks if it can be proven that they never fail. Whenever possible, it moves bounds checks out of loops to reduce the total number of executed checks. If such a check fails, the executing program branches into the unmodified loop to preserve the exception semantics of Java. For the scientific SciMark 2.0 benchmark suite, this algorithm removes on average 76% of bounds check instructions. The evaluation shows a speedup near to the theoretical maximum for LU test case.\",\"PeriodicalId\":333607,\"journal\":{\"name\":\"2009 Seventh ACIS International Conference on Software Engineering Research, Management and Applications\",\"volume\":\"144 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2009-12-02\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2009 Seventh ACIS International Conference on Software Engineering Research, Management and Applications\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/SERA.2009.11\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2009 Seventh ACIS International Conference on Software Engineering Research, Management and Applications","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/SERA.2009.11","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

作为一种类型安全的程序语言,Java需要对数组访问进行边界检查。无论何时访问数组元素,都会执行cmp(比较)指令来检查索引值是否在有效范围内。由于精确的异常,数组边界检查可能会阻止许多有用的优化。针对Java静态编译器,提出了一种新的基于稀疏表示的数组边界检查消除算法(ABCE)来消除冗余检查。与在jvm中执行的其他方法相比,我们坚持静态编译器的设计原则来优化科学的Java应用程序。该算法是一种轻量级算法,工作在静态单赋值形式的中间表示上。如果可以证明边界检查永远不会失败,则完全取消边界检查。只要有可能,它就会将边界检查移出循环,以减少执行检查的总数。如果这样的检查失败,执行的程序将进入未修改循环,以保留Java的异常语义。对于科学的SciMark 2.0基准测试套件,该算法平均删除76%的边界检查指令。评估表明,对于LU测试用例,加速接近理论最大值。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Array Bounds Check Elimination for Java Based on Sparse Representation
As a type-safe program language, Java requires bounds checks of array accesses. Whenever an array element is accessed, a cmp (compare) instruction is executed to check whether the index value is within the valid bounds. Array bounds checks may prevent many useful optimizations because of precise exception. We present a new ABCE (Array Bounds Check Elimination) algorithm to eliminate redundant checks based on sparse representation for a Java static compiler. In contrast to other approaches performing in JVMs, we adhere to the design principle of the static compiler to optimize scientific Java applications. The algorithm is a light-weight algorithm working on an intermediate representation in Static Single Assignment form. It fully removes bounds checks if it can be proven that they never fail. Whenever possible, it moves bounds checks out of loops to reduce the total number of executed checks. If such a check fails, the executing program branches into the unmodified loop to preserve the exception semantics of Java. For the scientific SciMark 2.0 benchmark suite, this algorithm removes on average 76% of bounds check instructions. The evaluation shows a speedup near to the theoretical maximum for LU test case.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
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学术官方微信