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
Preview
Unable to display preview. Download preview PDF.
References
Aho, A.V., Johnson, S.C.: Optimal Code Generation for Expression Trees, J. ACM 23:3, 1976, 488–501
Aho, A.V., Sethi, R., Ullman, J.D.: Compilers: Principles, Techniques, and Tools. Addison-Wesley, 1986
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
Chaitin, G.J.: Register allocation & spilling via graph coloring. ACM SIGPLAN Notices 17:6, 201–7, 1982
The Connection Machine CM-5 Technical Summary, Thinking Machines Corporation, Cambridge, MA, 1991
Dongarra, J.J., Jinds, A.R.: Unrolling Loops in Fortran, Software Practice and Experience, 9:3, 219–26, 1979
Fisher, J.,: Trace Scheduling: A Technique for Global Microcode Compaction, IEEE Transactions on Computers, C-30:7, 1981
Goodman J.R., Hsu Wei-Chung: Code Scheduling and Register Allocation in Large Basic Blocks, ACM Int. Conf. on Supercomputing, 1988, 442–52
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
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
Mehlhorn, K.: Data Structures and Algorithms 2. Springer, 1984
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
Sethi, R., Ullman, J.D.: The generation of optimal code for arithmetic expressions. J. ACM, Vol. 17, 715–28, 1970
Sethi, R.: Complete register allocation problems. SIAM J. Comput. 4, 226–48, 1975
Author information
Authors and Affiliations
Editor information
Rights 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