Skip to main content

Composing Transformations to Optimize Linear Code

  • Conference paper
Theoretical Aspects of Computing – ICTAC 2007 (ICTAC 2007)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 4711))

Included in the following conference series:

  • 397 Accesses

Abstract

We study the effect of an optimizing algorithm for straight–line code which first constructs a directed acyclic graph representing the given program and then generates code from it. We show that this algorithm produces optimal code with respect to the classical transformations known as Constant Folding, Common Subexpression Elimination, and Dead Code Elimination. In contrast to the former, the latter are also applicable to iterative code containing loops. We can show that the graph–based algorithm essentially corresponds to a combination of the three classical optimizations in conjunction with Copy Propagation. Thus, apart from its theoretical importance, this result is relevant for practical compiler design as it potentially allows to exploit the optimization potential of the graph–based algorithm for non–linear code as well.

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. Aho, A.V., Johnson, S.C.: Optimal code generation for expression trees. J. ACM 23(3), 488–501 (1976)

    MATH  MathSciNet  Google Scholar 

  2. Aho, A.V., Johnson, S.C., Ullman, J.D.: Code generation for expressions with common subexpressions. J. ACM 24(1), 146–160 (1977)

    MATH  MathSciNet  Google Scholar 

  3. Aho, A.V., Sethi, R., Ullman, J.D.: A formal approach to code optimization. ACM SIGPLAN Notices 5(7), 86–100 (1970)

    Article  Google Scholar 

  4. Aho, A.V., Sethi, R., Ullman, J.D.: Compilers: Principles, Techniques, and Tools. Addison–Wesley, London, UK (1986)

    Google Scholar 

  5. Ibarra, O.H., Leininger, B.S.: The complexity of the equivalence problem for straight–line programs. In: STOC 1980. Proc. of the 12th Annual ACM Symp. on Theory of Computing, pp. 273–280. ACM Press, New York, NY, USA (1980)

    Chapter  Google Scholar 

  6. Nielson, F., Nielson, H.R., Hankin, C.: Principles of Program Analysis. Springer, Heidelberg (1999)

    MATH  Google Scholar 

  7. Noll, T., Rieger, S.: Optimization of straight–line code revisited. Technical Report 2005–21, RWTH Aachen University, Dept. of Computer Science, Germany (2005), http://sunsite.informatik.rwth-aachen.de/Publications/AIB/

  8. Rieger, S.: SLC Optimizer - Web Interface (2005), http://aprove.informatik.rwth-aachen.de/~rieger/

Download references

Author information

Authors and Affiliations

Authors

Editor information

Cliff B. Jones Zhiming Liu Jim Woodcock

Rights and permissions

Reprints and permissions

Copyright information

© 2007 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Noll, T., Rieger, S. (2007). Composing Transformations to Optimize Linear Code. In: Jones, C.B., Liu, Z., Woodcock, J. (eds) Theoretical Aspects of Computing – ICTAC 2007. ICTAC 2007. Lecture Notes in Computer Science, vol 4711. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-75292-9_29

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-75292-9_29

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-75290-5

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

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics