This paper presents a compiler optimization algorithm to reduce the run time overhead of array subscript range checks in programs without compromising safety. The algorithm is based on partial redundancy elimination and it incorporates previously developed algorithms for range check optimization. We implemented the algorithm in our research compiler, Nascent, and conducted experiments on a suite of 10 benchmark programs to obtain four results: (1) the execution overhead of naive range checking is high enough to merit optimization, (2) there are substantial differences between various optimizations, (3) loop-based optimizations that hoist checks out of loops are effective in eliminating about 98% of the range checks, and (4) more sophisticated analysis and optimization algorithms produce very marginal benefits.
本文提出了一种编译器优化算法,以减少程序中数组下标范围检查的运行时间开销,而又不影响安全性。该算法基于部分冗余消除,并结合了先前开发的用于范围检查优化的算法。我们在研究编译器Nascent中实施了该算法,并在10个基准测试程序套件上进行了实验,以获得四个结果:(1)天真的范围检查的执行开销足以进行优化,(2)存在实质性差异在各种优化之间,(3)提升循环外检查的基于循环的优化有效地消除了约98%的范围检查,并且(4)更复杂的分析和优化算法产生了非常小的优势。 P>
机译:消除冗余数组下标范围检查
机译:使用最弱前提条件消除动态缓冲区溢出检测中的冗余边界检查
机译:通过断言消除冗余异常检查
机译:使用符号评估消除GNAT中的冗余范围检查
机译:Java数组边界检查消除的综合方法。
机译:突触前毒蕈碱乙酰胆碱受体和TrkB受体合作消除在开发过程中多余的运动神经末梢。
机译:消除冗余数组下标范围检查
机译:运输安全:国土安全部努力消除冗余背景调查