Abstract
Aggressive compilers employ a larger number of well understood optimizations in the hope of improving compiled code quality. Unfortunately, these optimizations require a variety of intermediate program representations. A first step towards unifying these optimizations to a common intermediate representation is described. The representation chosen is the program dependence graph, which captures both control-flow and data-flow information from a program.
The optimization of (interprocedural) constant propagation is studied. The algorithm developed combines a program dependence graph called the system dependence graph (SDG) with the ideas of data-flow computing and graph rewriting. The algorithm safely finds the classes of constants found by other intraprocedural and intraprocedural constant propagation algorithms. In addition, the SDG allows constants to propagate through procedures. This enables the algorithm to discover constants in a calling procedure even thought no constants exist in the called procedure.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Aho, A.V., Sethi, R., and Ullman, J.D., Compilers: Principles, Techniques, and Tools, Addison-Wesley, Reading, MA (1986).
Allen, R. and Kennedy, K., “Automatic translation of FORTRAN programs to vector form,” ACM Transactions on Programming Languages and Systems 9(4) pp. 491–542 (October 1987).
Banning, J.P., “An efficient way to find the side effects of procedure calls and the aliases of variables,” pp. 29–41 in Conference Record of the Sixth ACM Symposium on Principles of Programming Languages, (San Antonio, TX, Jan. 29–31, 1979), ACM, New York, NY (1979).
Barth, J.M., “A practical interprocedurai data flow analysis algorithm,” Commun. of the ACM 21(9) pp. 724–736 (September 1978).
Binkley, D., Horwitz, S., and Reps, T., “The multi-procedure equivalence theorem,” TR-890, Computer Sciences Department, University of Wisconsin, Madison, WI (November 1989).
Binkley, D., “Slicing in the presence of parameter aliasing,” pp. 261–268 in 1993 Software Engineering Research Forum, (Orlando, FL, Nov, 1993), (1993).
Binkley, D., “Precise executable interprocedural slices,” to appear in ACM Letters on Programming Languages and Systems, (1994).
Callahan, D., Cooper, K.D., Kennedy, K., and Torczon, L., “Interprocedural constant propagation,” Proceedings of the S1GPLAN 86 Symposium on Compiler Construction, (Palo Alto, CA, June 25–27, 1986), ACM SIGPLAN Notices 21(7) pp. 152–161 (July 1986).
Cartwright, R. and Felleisen, M., “The semantics of program dependence,” Proceedings of the ACM SIGPLAN 89 Conference on Programming Language Design and Implementation, (Portland, OR, June 21–23, 1989), ACM SIGPLAN Notices, (1989).
Chambers, C., Hözle, U., and Ungar, D., “Debugging optimized code with dynamic deoptimization,” Proceedings of the ACM SIGPLAN 92 Conference on Programming Language Design and Implementation, (San Francisco, CA, June 17–19, 1992), ACM SIGPLAN Notices 27(7) pp. 32–42 (June 1992).
Cytron, R., Ferrante, J., Rosen, B.K., Wegman, M.N., and Zadeck, K., “An efficient method of computing static single assignment form,” pp. 25–35 in Conference Record of the Sixteenth ACM Symposium on Principles of Programming Languages, (Austin, TX, Jan. 11–13, 1989), ACM, New York, NY (1989).
Ferrante, J., Ottenstein, K., and Warren, J., “The program dependence graph and its use in optimization,” ACM Transactions on Programming Languages and Systems 9(3) pp. 319–349 (July 1987).
Grove, D. and Torczon, L., “Interprocedural constant propagation: A study of jump function implementations,” Proceedings of the ACM SIGPLAN 93 Conference on Programming Language Design and Implementation, (Albuquerque, NM, June 23–25, 1993), pp. 90–99 ACM, (1993).
Horwitz, S., Prins, J., and Reps, T., “Integrating non-interfering versions of programs,” ACM Trans. Program. Lang. Syst. 11(3) pp. 345–387 (July 1989).
Horwitz, S., Reps, T., and Binkley, D., “Interprocedural slicing using dependence graphs,” ACM Trans. Program. Lang. Syst. 12(1) pp. 26–60 (January 1990).
Kildall, G.A., “A unified approach to global program optimization,” pp. 194–206 in Conference Record of the First ACM Symposium on Principles of Programming Languages, (October 1973), ACM, New York, NY (1973).
Kuck, D.J., Kuhn, R.H., Leasure, B., Padua, D.A., and Wolfe, M., “Dependence graphs and compiler optimizations,” pp. 207–218 in Conference Record of the Eighth ACM Symposium on Principles of Programming Languages, (Williamsburg, VA, January 26–28, 1981), ACM, New York, NY (1981).
Selke, R, “A graph semantics for program dependence graphs,” pp. 12–24 in Conference Record of the Sixteenth ACM Symposium on Principles of Programming Languages, (Austin, TX, January 11–13, 1989), ACM, New York, NY (1989).
Wegman, M.N. and Zadeck, F.K., “Constant propagation and conditional branches,” ACM Transactions on Programming Languages and Systems 13(2) pp. 181–210 ACM, (April, 1991).
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1994 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Binkley, D. (1994). Interprocedural constant propagation using dependence graphs and a data-flow model. In: Fritzson, P.A. (eds) Compiler Construction. CC 1994. Lecture Notes in Computer Science, vol 786. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-57877-3_25
Download citation
DOI: https://doi.org/10.1007/3-540-57877-3_25
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-57877-2
Online ISBN: 978-3-540-48371-7
eBook Packages: Springer Book Archive