An Improved Algorithm for Redundancy Detection Using Global Value Numbering

- Journal title : Journal of Information Processing Systems
- Volume 12, Issue 2, 2016, pp.214-225
- Publisher : Korea Information Processing Society
- DOI : 10.3745/JIPS.02.0014

Title & Authors

An Improved Algorithm for Redundancy Detection Using Global Value Numbering

Saleena, Nabizath; Paleri, Vineeth;

Saleena, Nabizath; Paleri, Vineeth;

Abstract

Global value numbering (GVN) is a method for detecting equivalent expressions in programs. Most of the GVN algorithms concentrate on detecting equalities among variables and hence, are limited in their ability to identify value-based redundancies. In this paper, we suggest improvements by which the efficient GVN algorithm by Gulwani and Necula (2007) can be made to detect expression equivalences that are required for identifying value based redundancies. The basic idea for doing so is to use an anticipability-based Join algorithm to compute more precise equivalence information at join points. We provide a proof of correctness of the improved algorithm and show that its running time is a polynomial in the number of expressions in the program.

Keywords

Equivalent Expression;Global Value Numbering;Herbrand Equivalence;Strong Equivalence Dag;

Language

English

References

1.

S. Gulwani and G. C. Necula, "A polynomial-time algorithm for global value numbering," Science of Computer Programming, vol. 64, no. 1, pp. 97-114, 2007.

2.

B. K. Rosen, M. N. Wegman, and F. K. Zadeck, "Global value numbers and redundant computations," in Proceedings of the 15th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL1988), San Diego, CA, 1988, pp. 12-27.

3.

O. Ruthing, J. Knoop, and B. Steffen, "Detecting equalities of variables: combining efficiency with precision," in Static Analysis. Heidelberg: Springer, 1999, pp. 232-247.

4.

G. A. Kildall, "A unified approach to global program optimization," in Proceedings of the 1st Annual ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (POPL1973), Boston, MA, 1973, pp. 194-206.

5.

A. W. Appel. Modern Compiler Implementation in Java. 2nd ed. Cambridge: Cambridge University Press, 2002.

6.

S. S. Muchnick, Advanced Compiler Design Implementation. San Francisco, CA: Morgan Kaufmann Publishers, 1997.

7.

B. Alpern, M. N. Wegman, and F. K. Zadeck, "Detecting equality of variables in programs," in Proceedings of the 15th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL1988), San Diego, CA, 1988, pp. 1-11.

8.

J. Knoop, O. Ruthing, and B. Steffen, "Lazy code motion," in Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI1992), San Francisco, CA, 1992, pp. 224-234.

9.

E. Morel and C. Renvoise, "Global optimization by suppression of partial redundancies," Communications of the ACM, vol. 22, no. 2, pp. 96-103, 1979.

10.

V. K. Paleri, Y. N. Srikant, and P. Shankar, "Partial redundancy elimination: a simple, pragmatic, and provably correct algorithm," Science of Computer Programming, vol. 48, no. 1, pp. 1-20, 2003.

11.

P. Briggs, K. D. Cooper, and L. T. Simpson, "Value numbering," Software-Practice and Experience, vol. 27, no. 6, pp. 701-724, 1997.

12.

T. VanDrunen and A. L. Hosking, "Value-based partial redundancy elimination," in Compiler Construction. Heidelberg: Springer, 2004, pp. 167-184.

13.

K. Gargi, "A sparse algorithm for predicated global value numbering," ACM SIGPLAN Notices, vol. 37, no. 5, pp. 45-56, 2002.

14.

J. T. Nie and X. Cheng, "An efficient ssa-based algorithm for complete global value numbering," in Programming Languages and Systems. Heidelberg: Springer, 2007, pp. 319-334.

15.

R. Cytron, J. Ferrante, B. K. Rosen, M. N. Wegman, and F. K. Zadeck, "Efficiently computing static single assignment form and the control dependence graph," ACM Transactions on Programming Languages and Systems, vol. 13, no. 4, pp. 451-490, 1991.

16.

B. Steffen, J. Knoop, and O. Ruthing, "The value flow graph: a program representation for optimal program transformations," in Proceedings of the 3rd European Symposium on Programming, Copenhagen, Denmark, 1990, pp. 389-405.