Abstract
Static Single Assignment (SSA) intermediate representations have become quite popular in compiler development. One advantage of the SSA form is that each variable corresponds to exactly one definition, and thus two references of the same SSA variable must denote the same value. To date, most SSA forms concentrate on scalar variables, and it is difficult to extend these intermediate representations to languages with multi-level pointers like In this paper we introduce a Extended SSA Numbering, a simple analysis that concentrates on the “same name, same value” property of SSA form. The analysis handles all variable references, including those via pointer indirections. For each scalar variable, Extended SSA Numbering associates a primary SSA number, whereas for each pointer variable, it associates both a primary and secondary SSA number. Extended SSA Numbering can be easily implemented in any compiler that supports pointer analysis and sideeffect analysis. There is no need to change the intermediate form used in the compiler since SSA numbers can be captured as dataflow attributes. In this paper we present our implementation of the technique in the McCAT optimizing/parallelizing C compiler. Further, we demonstrate the usefulness of Extended SSA Numbers by describing several typical applications.
Keywords
- Pointer Variable
- Intermediate Representation
- Variable Reference
- Definition Point
- Program Language Design
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.
Download to read the full chapter text
Chapter PDF
References
Bowen Alpern, Mark N. Wegman, and F. Kenneth Zadeck. Detecting equality of variables in programs. In Conf. Rec. of the Fifteenth Ann, AC.11 Symp. on Principles of Programming Languages, pages 1–11, San Diego, Calif., Jan. 1988.
Marc M. Brandis and Hanspeter Mössenböck. Single-pass generation of static single-assignment form for structured languages. ACM Trans. on Programming Languages and Systems, 16(6):1684–1698, Nov, 1994.
Fred Chow, Sun Chan, Shin-Ming Liu, Raymond Lo, and Mark Streich. Effective representation of aliases and indirect memory operations in ssa form. In Proceedings of the International Conference on Compiler Construction, pages 253–267, 1996.
Ron Cytron, Jeanne Ferrante. Barry K. Rosen, Mark N. Wegman, and F. Kenneth Zadeck. An efficient method of computing static single assignment form, In Conf. Rec. of the Sixteenth Ann. ACM Symp. on Principles of Programming Languages, pages 25–35, Austin, Tex., Jan. 1989.
Ron Cytron, Jeanne Ferrante. Barry K. Rosen, Mark N. Wegman, and F. Kenneth Zadeck. Efficiently computing static single assignment form and the control dependence graph. ACM Trans. on Programming Languages and Systems, 13(4):451–490, Oct. 1991.
Ron Cytron and Reid Gershbein. Efficient accommodation of may-alias information in SSA form. In Proc. of the ACM SIGPLAN '93 Conf. on Programming Language Design and Implementation, pages 36–45, Albuquerque, N. Mex., Jun. 1993.
Maryam Emami, Rakesh Ghiya, and Laurie J. Hendren. Context-sensitive interprocedural points-to analysis in the presence of function pointers. In Proc. of the ACM SIGPLAN '94 Conf. on Programming Language Design and Implementation, pages 242–256, Orlando, Flor., Jun. 1994.
Ana M. Erosa and Laurie J. Hendren. Taming control flow: A structured approach to eliminating goto statements. In Proc. of the 199 Intl. Conf. on Computer Languages, pages 229–240, Toulouse, France, May 1994.
Ana Marie Erosa. A goto-elimination method and its implementation for the McCAT C compiler. Master's thesis, McGill U., Montréal, Qué., May 1995.
Rakesh Ghiya and Laurie J. Hendren. Connection analysis: A practical interprocedural heap analysis for C. Intl. J. of Parallel Programming, 24(6):547–578, 1996.
Rakesh Ghiya. Practical techniques for interprocedural heap analysis. Master's thesis, McGill U., Montréal. Qu6., Jan. 1996.
Rakesh Ghiya. Putting Pointer Analysis to Work. PhD thesis, McGill U., Montréal, Qué., Nov. 1997.
L. Hendren, C. Donawa, M. Emami, G. Gao, Justiani, and B. Sridharan. Designing the McCAT compiler based on a family of structured intermediate representations. In Proc. of the 5th Intl. Work. on Languages and Compilers for Parallel Computing, number 757 in Lec. Notes in Comp. Sci., pages 406–420, New Haven. Conn., Aug. 1992. Springer-Verlag. Publ. in 1993.
Justiani and Laurie J. Hendren. Supporting array dependence testing for an optimizing/parallelizing C compiler. In Proc. of the 5th Intl. Conf. on Compiler Construction, number 786 in Lec. Notes in Comp. Sci., pages 309–323, Edinburgh, Scotland, Apr. 1994. Springer-Verlag.
Christopher Lapkowski. A practical symbolic array dependence analysis framework for c. Master's thesis. McGill U., Montréal, Qué., Jun. 1997.
Christopher Lapkowski and Laurie J. Hendren. Extended SSA numbering: Introducing SSA properties to languages with multi-level pointers. ACAPS Tech. Memo 102, Sch. of Comp. Sci., McGill U., Montréal, Qué., Apr. 1996.In ftp://ftp-acaps.cs.mcgill.ca/pub/doc/memos.
Barry K. Rosen, Mark N. Wegman, and F. Kenneth Zadeck. Global value numbers and redundant computations. In Conf. Rec. of the Fifteenth Ann. ACM Symp. on Principles of Programming Languages, pages l2–27, San Diego, Calif., Jan. 1988.
Vugranam C. Sreedhar and Guang R. Gao. A linear time algorithm for placing Ø-nodes. In Conf. Rec. of the 22nd ACM SIGPLA_V-SIGACT Symp. on Principles of Programming Languages, pages 62–73, San Francisco, Calif., Jan. 1995.
Michael Wolfe. Beyond induction variables. In Proc. of the ACM SIGPLAN '92 Conf. on Programming Language Design and Implementation, pages 162–174, San Francisco, Calif.. Jun. 1992.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1998 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Lapkowski, C., Hendren, L.J. (1998). Extended SSA mumbering: Introducing SSA properties to languages with multi-level pointers. In: Koskimies, K. (eds) Compiler Construction. CC 1998. Lecture Notes in Computer Science, vol 1383. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0026427
Download citation
DOI: https://doi.org/10.1007/BFb0026427
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-64304-3
Online ISBN: 978-3-540-69724-4
eBook Packages: Springer Book Archive