Skip to main content

Translating Out of Static Single Assignment Form

  • Conference paper
  • First Online:
Static Analysis (SAS 1999)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1694))

Included in the following conference series:

Abstract

Programs represented in Static Single Assignment (SSA) form contain phi instructions (or functions) whose operational semantics are to merge values coming from distinct control flow paths. However, translating phi instructions into native instructions is nontrivial when transformations such as copy propagation and code motion have been performed. In this paper we present a new framework for translating out of SSA form. By appropriately placing copy instructions, we ensure that none of the resources in a phi congruence class interfere. Within our framework, we propose three methods for copy placement. The first method pessimistically places copies for all operands of phi instructions. The second method uses an interference graph to guide copy placement. The third method uses both data flow liveness sets and an interference graph to guide copy placement. We also present a new SSA-based coalescing method that can selectively remove redundant copy instructions with interfering operands. Our experimental results indicate that the third method results in 35% fewer copy instructions than the second method. Compared to the first method, the third method, on average, inserts 89.9% fewer copies during copy placement and runs 15% faster, which are significant reductions in compilation time and space.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. A. V. Aho, R. Sethi, and J. D. Ullman. Compilers: Principles, Techniques, and Tools. Addison-Wesley, 1986.

    Google Scholar 

  2. P. Briggs, K. Cooper, T. Harvey, and Taylor Simpson. Practical improvements to the construction and destruction of static single assignment form. Software-Practice and Experience, 28(8):859–881, July 1998.

    Article  Google Scholar 

  3. G. J. Chaitin, Register allocation and spilling via graph coloring. SIGPLAN Notices 17(6):98–105, June 1982. Proc. of the ACM SIGPLAN’ 82 Symp. on Compiler Construction.

    Article  MathSciNet  Google Scholar 

  4. F. Chow, S. Chan, R. Kennedy, S. Liu, R. Lo, and P. Tu, “A New Algorithm for Partial Redundancy Elimination based on SSA Form,” Proc. of the 1997 ACM SIGPLAN Conf. on Programming Language Design and Implementation, pp. 273–286, 1997.

    Google Scholar 

  5. C. Click. Global Code Motion Global Value Numbering. SIGPLA Notices, 30(6):246–257, June 1995. Proceedings of the ACM SIGPLAN’95 Conference on Programming Language Design and Implementation.

    Article  Google Scholar 

  6. R. Cytron and R. Gershbein. Efficient accommodation of may-alias information in SSA form. SIGPLAN Notices, 28(6):36–45, June 1993. Proceedings of the ACM SIGPLAN’93 Conference on Programming Language Design and Implementation

    Article  Google Scholar 

  7. 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, 13(4):451–490, October 1991.

    Article  Google Scholar 

  8. A. Leung and L. George. Static Single Assignment Form for Machine Code. SIGPLAN Notices, 34(5):204–214, May 1999. Proceedings of the ACM SIGPLAN’99 Conference on Programming Language Design and Implementation.

    Article  Google Scholar 

  9. S. Muchnick. Advanced Compiler Design and Implementation. Morgan Kaufmann Publishers, CA, 1997.

    Google Scholar 

  10. P. Pineo and M. L. Soffa. A practical approach to the symbolic debugging of parallelized code. Proceedings of International Conference on Compiler Construction, April 1994.

    Google Scholar 

  11. V. C. Sreedhar and G. R. Gao. Computing f-nodes in linear time using DJ graphs. Journal of Programming Languages, 13(4):191–213, 1996.

    Google Scholar 

  12. M. N. Wegman and F. K. Zadeck. Constant propagation with conditional branches. ACM Transactions on Programming Languages and Systems, 13(2):181–210, April 1991.

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1999 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Sreedhar, V.C., Ju, R.DC., Gillies, D.M., Santhanam, V. (1999). Translating Out of Static Single Assignment Form. In: Cortesi, A., Filé, G. (eds) Static Analysis. SAS 1999. Lecture Notes in Computer Science, vol 1694. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-48294-6_13

Download citation

  • DOI: https://doi.org/10.1007/3-540-48294-6_13

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-66459-8

  • Online ISBN: 978-3-540-48294-9

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics