Skip to main content

Optimal contiguous expression DAG evaluations

  • Communications
  • Conference paper
  • First Online:
Fundamentals of Computation Theory (FCT 1995)

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

Included in the following conference series:

  • 144 Accesses

Abstract

Generating evaluations for expression DAGs with a minimal number of registers is NP-complete. We present two algorithms that generate optimal contiguous evaluation for a given DAG. The first is a modification of a complete search algorithm that omits redundant evaluations. The second algorithm generates only the most promising evaluations by splitting the DAG into trees with import and export nodes and evaluating the trees with a modified labeling scheme. Experiments with randomly generated DAGs and large DAGs from real application programs confirm that the new algorithms generate optimal contiguous evaluations quite fast.

supported by DFG, SFB 124, TP D4

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

Access this chapter

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, 1976, 488–501

    Google Scholar 

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

    Google Scholar 

  3. Chaitin, G.J., Auslander M.A., Chandra A.K., Cocke J., Hopkins M.E., Markstein P.W.: Register allocation via coloring. Computer Languages Vol. 6, 47–57, 1981

    Article  Google Scholar 

  4. Chaitin, G.J.: Register allocation & spilling via graph coloring. ACM SIGPLAN Notices 17:6, 201–7, 1982

    Google Scholar 

  5. The Connection Machine CM-5 Technical Summary, Thinking Machines Corporation, Cambridge, MA, 1991

    Google Scholar 

  6. Dongarra, J.J., Jinds, A.R.: Unrolling Loops in Fortran, Software Practice and Experience, 9:3, 219–26, 1979

    Google Scholar 

  7. Fisher, J.,: Trace Scheduling: A Technique for Global Microcode Compaction, IEEE Transactions on Computers, C-30:7, 1981

    Google Scholar 

  8. Goodman J.R., Hsu Wei-Chung: Code Scheduling and Register Allocation in Large Basic Blocks, ACM Int. Conf. on Supercomputing, 1988, 442–52

    Google Scholar 

  9. Keßler, C.W., Paul, W.J., Rauber, T.: A Randomized Heuristic Approach to Register Allocation. Proc. of PLILP'91 3rd Int. Symp. on Programming Language Implem. and Logic Programming, Aug. 26–28, 1991. Springer LNCS 528, 195–206

    Google Scholar 

  10. Keßler, C.W., Paul, W.J., Rauber, T.: Scheduling Vector Straight Line Code on Vector Processors. in: R. Giegerich, S.L. Graham (Ed.): Code Generation—Concepts, Tools, Techniques. Springer Workshops in Computing Series (WICS), 1992

    Google Scholar 

  11. Mehlhorn, K.: Data Structures and Algorithms 2. Springer, 1984

    Google Scholar 

  12. Rauber, T.: An Optimizing Compiler for Vector Processors. Proc. ISMM Int. Conf. on Par. and Distr. Computing and Systems, New York 1990, Acta press, 97–103

    Google Scholar 

  13. Sethi, R., Ullman, J.D.: The generation of optimal code for arithmetic expressions. J. ACM, Vol. 17, 715–28, 1970

    Google Scholar 

  14. Sethi, R.: Complete register allocation problems. SIAM J. Comput. 4, 226–48, 1975

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Horst Reichel

Rights and permissions

Reprints and permissions

Copyright information

© 1995 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Keßler, C.W., Rauber, T. (1995). Optimal contiguous expression DAG evaluations. In: Reichel, H. (eds) Fundamentals of Computation Theory. FCT 1995. Lecture Notes in Computer Science, vol 965. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-60249-6_61

Download citation

  • DOI: https://doi.org/10.1007/3-540-60249-6_61

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-60249-1

  • Online ISBN: 978-3-540-44770-2

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics