Skip to main content

Partial Dead Code Elimination Using Extended Value Graph

  • Conference paper
  • First Online:
  • 515 Accesses

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

Abstract

This paper presents an efficient and effective code optimization algorithm for eliminating partially dead assignments, which become redundant on execution of specific program paths. It is one of the most aggressive compiling techniques, including invariant code motion from loop bodies. Since the traditional techniques proposed to this optimization would produce the second-order effects such as sinking-sinking effects, they should be repeatedly applied to eliminate dead code completely, paying higher computation cost. Furthermore, there is a restriction that assignments sunk to a join point on ow of control must be lexically identical.

Our technique proposed here can eliminate possibly more dead assignments without the restriction at join points, using an explicit representation of data dependence relations within a program in a form of SSA (Static Single Assignment). Such representation called Extended Value Graph (EVG), shows the computationally equivalent structure among assignments before and after moving them on the control ow graph. We can get the final result directly by once application of this technique, because it can capture the second-order effects as the main effects, based on EVG.

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

Buying options

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

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

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

    Google Scholar 

  2. Alpern, B., Wegman, M. N. and Zadeck, F. K.: Detecting Equality of Variables in Programs, POPL, ACM, (1988) 1–11.

    Google Scholar 

  3. Appel, A. W.: Modern Compiler Implementation in ML, Cambridge University Press (1998).

    Google Scholar 

  4. Briggs, P. and Cooper, K. D.: Effective Partial Redundancy Elimination, PLDI, ACM, (1994) 159–170.

    Google Scholar 

  5. Clock, C.: Global Code Motion Global Value Numbering, PLDI, ACM, (1995) 246–257.

    Google Scholar 

  6. Cytron, R., Ferrante, J., Rosen, B. K. and Wegman, M. N.: Efficiently Computing Static Single Assignment Form and Control Dependence Graph, ACM TOPLAS, Vol. 13,No. 4, (1991) 451–490.

    Article  Google Scholar 

  7. Dhamdhere, D. M., Rose, B. K. and Zadeck, F. K.: How to Analyze Large Programs Efficiently and Informatively, PLDI, ACM, (1992) 212–223.

    Google Scholar 

  8. Feigen, L., Klappholz, D., Casazza, R. and Xue, X.: The Revival Transformation, POPL, ACM, (1994) 421–434.

    Google Scholar 

  9. Khedker, U. P. and Dhamdhere, D. M.: A Generalized Theory of Bit Bector Data Flow Analysis, ACM TOPLAS, Vol. 16,No. 5, (1994) 1472–1511.

    Article  Google Scholar 

  10. Knoop, J., Rüthing, O. and Steffen, B.: Lazy Code Motion, PLDI, ACM, (1992) 224–234.

    Google Scholar 

  11. Knoop, J., Rüthing, O. and Steffen, B.: Partial Dead Code Elimination, PLDI, ACM, (1994) 147–158.

    Google Scholar 

  12. Muchnick, S. S.: Advanced Compiler Design Implementation, Morgan Kaufmann, Reading, Mass. (1997).

    Google Scholar 

  13. R. Gupta, D. B. and Fang, J.: Path Profile Guided Partial Dead Code Elimination Using Predication, PACT, IEEE, (1997) 102–115.

    Google Scholar 

  14. Bodik, R. and Gupta, R.: Partial Dead Code Elimination Using Slicing Transformations, PLDI, ACM, (1997) 159–170.

    Google Scholar 

  15. Sreedhar, V. C. and Gao, G. R.: A Linear Time Algorithm for Placing φ-Nodes, POPL, ACM, (1995) 62–73.

    Google Scholar 

  16. Steffen, B., Knoop, J. and O. Rüthing: The Value Flow Graph: A rogram representation for optimal program transformations, Proc. 3rd ESOP, Copenhagen, Denmark, Springer-Verlag, (1990) 389–405.

    Google Scholar 

  17. Takimkoto, M. and Harada, K.: Effective Partial Redundancy Elimination based on Extended Value Graph, Information Processing Society of Japan, Vol. 38,No. 11, (1997) 2237–2250.

    MathSciNet  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

Takimoto, M., Harada, K. (1999). Partial Dead Code Elimination Using Extended Value Graph. 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_12

Download citation

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

  • 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