Computer Software
Print ISSN : 0289-6540
Demand-driven Scalar Replacement
Yasunobu SUMIKAWARyo OJIMAMunehiro TAKIMOTO
Author information
JOURNAL FREE ACCESS

2015 Volume 32 Issue 2 Pages 2_93-2_113

Details
Abstract

We propose a demand-driven scalar replacement (DDSR) that is essentially an extension of partial redundancy elimination (PRE), which is an optimization technique that removes partially redundant expressions. PRE removes redundant expressions within a single iteration for a loop, while DDSR can additionally remove redundant array references over several iterations, resulting in scalar replacement. DDSR traverses a control flow graph in topological sort order, and once an array reference is visited, DDSR backwardly propagates the query to determine if the reference is redundant. Once the query is propagated to the definition of the induction variable used for the inquiry's array reference index, the variable is replaced with the right-hand side of the de nition, to check for redundancy in other iterations. We give a practical approach combining the query propagation with the loop unrolling. The approach restricts the region of query propagation to just two iterations by unrolling a loop in advance, so that the replacement of the induction variable is applied just once, which contributes to an efficient query propagation. We have implemented our approach on a practical compiler, and evaluated it using SPEC benchmarks. The experimental results demonstrate that our approach can improve the execution efficiency of the objective code about 2.3% in the best case in comparison with a traditional scalar replacement technique.

Content from these authors
© 2015 Japan Society for Software Science and Technology
Previous article Next article
feedback
Top