Abstract
The effectiveness of parallelizing and optimizing compilers depends on the ability to do accurate dependence analysis. In the case of programs that use arrays, array dependence analysis methods are critical, and powerful methods for dependence testing have been widely established. In order to collect the input required to actually apply the dependence tester, one must first apply the following support phases: (1) locate all admissible loop nests, (2) collect the normalized index expressions for each array reference, and (3) determine which pairs of array references must be tested. When implementing a dependence testing framework in C, each of these support phases must deal with complexities such as the presence of pointers and complicated control flow due to complex loop structures. Furthermore, each phase must be performed as accurately as possible so as to maximize the number of admissible loop nests and minimize the number of dependence pairs requiring testing.
This paper describes the design and implementation of the support phases as developed in the dependence testing framework for the McCAT (McGill Compiler Architecture Testbed) optimizing/parallelizing C compiler. By taking advantage of the simplified and structured intermediate representation, and the advanced points-to (alias) and reaching definition analyses available in the McCAT compiler, we provide a unified framework for implementing all of the support analyses required for array dependence testing. As part of this framework we demonstrate scalar backward analysis, generalized induction variable detection, canonical subscript analysis, symbolic manipulation, and demand-driven constant propagation in the presence of complex C features.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
M. Emami, L. J. Hendren, and R Ghiya. Context-Sensitive Interprocedural Points-to Analysis in the Presence of Function Pointers. Proceedings of the SIGPLAN'94 Conference on Programming Language Design and Implementation (to appear), June 20–24, 1994.
Maryam Emami. A Practical Interprocedural Alias Analysis for An Optimizing C Compiler. Master's thesis, McGill University, July 1993.
Paul Feautrier. Dataflow Analysis of Array and Scalar References. In the series, Research Monographs in Laboratoire MASI, Universite Paris et Marie Curie, Paris,France, September 1991.
Michael P. Gerlek. Detecting Induction Variables using SSA-form. OGI-CSE Technical Report 93-014, Oregon Graduate Institute, June 7, 1993.
Gina Goff, Ken Kennedy, and Chau-Wen Tseng. Practical Dependence Testing. Proceedings of the SIGPLAN'91 Conference on Programming Language Design and Implementation, pages 15–29, June 26–28, 1991.
M. Haghighat and C. Polychronopoulos. Symbolic Dependence Analysis for High-Performance Parallelizing Compilers. Pitman, London and MIT Press, Cambridge, MA, 1991.
M. Haghighat and C. Polychronopoulos. Symbolic Analysis: A Basis for Parallelization, Optimization and Scheduling of Programs. Sixth Annual Workshop on Languages and Compilers for Parallel Computing, Portland, Oregon, pages dd1–dd23, August 12–14, 1993.
L. J. Hendren, C. Donawa, M. Emami, G. Gao, Justiani., and B Sridharan. Designing the McCAT Compiler based on a Family of Structured Intermediate Representations. Fifth Workshop on Languages and Compilers for Parallel Computing. Also to appear in LNCS, August 1992.
L.J. Hendren, M. Emami, C. Verbrugge, and R. Ghiya. A Practical Context-sensitive Interprocedural Analysis Framework for C Compilers. ACAPS Technical Memo 72, School of Computer Science, McGill University, July 1993.
Richard Johnson and Keshav Pingali. Dependence-based Program Analysis. Proceedings of the SIGPLAN'93 Conference on Programming Language Design and Implementation, pages 78–89, June 23–25, 1993.
Xiangyun Kong, David Klappholz, and Kleanthis Psarris. The I Test: An Improved Dependence Test for Automatic Parallelization and Vectorization. IEEE Transactions on Parallel and Distributed systems, 2(3):342–349, July 1991.
Vadim Maslov. Delinearization: An Efficient Way to Break Multiloop Dependence Equations. Proceedings of the SIGPLAN'92 Conference on Programming Language Design and Implementation, pages 152–161, June 17–19, 1992.
Dror E. Maydan, J.L.Hennessy, and Monica S. Lam. Efficient and Exact Data Dependence Analysis. Proceedings of the SIGPLAN'91 Conference on Programming Language Design and Implementation, pages 1–14, June 26–28, 1991.
Bhama Sridharan. An Analysis Framework for the McCat Compiler. Master's thesis, McGill University, December 1992.
Eric Stoltz, Michael P. Gerlek, and Michael Wolfe. Extended SSA with Factored Use-Def Chains to support Optimization and Parallelization. OGI-CSE Technical Report 93-013, Oregon Graduate Institute, June 7, 1993.
Mark N. Wegman and F. Kenneth Zadeck. Constant Propagation with Conditional Branches. ACM Transactions on Programming Languages and Systems, 13(2):181–210, April 1991.
Michael Wolfe. Optimizing Supercompilers for Supercomputers. The MIT Press, Cambrigde, Massachusetts, 1989.
Michael Wolfe. Beyond Induction Variables. Proceedings of the SIGPLAN'92 Conference on Programming Language Design and Implementation, pages 162–174, June 17–19, 1992.
Hanz Zima and Barbara Chapman. Supercompilers for Parallel and Vector Computers. ACM Press, Addison-Wesley Pub. Co., New York, 1990.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1994 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Justiani, Hendren, L.J. (1994). Supporting array dependence testing for an optimizing/parallelizing C compiler. In: Fritzson, P.A. (eds) Compiler Construction. CC 1994. Lecture Notes in Computer Science, vol 786. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-57877-3_21
Download citation
DOI: https://doi.org/10.1007/3-540-57877-3_21
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-57877-2
Online ISBN: 978-3-540-48371-7
eBook Packages: Springer Book Archive