Abstract
Even though impressive progress has been made in the area of optimizing and parallelizing array-based programs, the application of similar techniques to programs using pointer data structures has remained difficult. Unlike arrays which have a small number of well-defined properties, pointers can be used to implement a wide variety of structures which exhibit a much larger set of properties. The diversity of these structures implies that programs with pointer data structures cannot be effectively analyzed by traditional optimizing and parallelizing compilers.
In this paper we present a new approach that leads to the improved analysis and transformation of programs with recursively defined pointer data structures. Our approach is based on a mechanism for the Abstract Description of Data Structures (ADDS). ADDS is a simple extension to existing imperative languages that allows the programmer to explicitly describe the important properties of a large class of data structures. These abstract descriptions may be used by the compiler to achieve more accurate program analysis in the presence of pointers, which in turn enables and improves the application of numerous optimizing and parallelizing transformations. We present ADDS by describing various data structures; we discuss how such descriptions can be used to improve analysis and debugging; and we supply three important transformations enabled by ADDS.
- 1 AHO, A. V., SETHI, R., AND ULLMAN, J. D. Compilers: Principles, Techniques, and Tools. Addison-Wesley, Reading, Mass., 1987.]] Google Scholar
- 2 AIKEN, A., AND NICOLAU, A. Optimal loop para}lelization. In Proceedings of the SIGPLAN 1988 Conference on Programming Language Design and implementation (June 1988). ACM, New York, 308-317.]] Google Scholar
- 3 AIKEN, A., AND NICOLAU, A. Perfect pipelining: A new loop paralletization technique. In Proceedings of the 1988 European Symposium on Programming. Lecture Notes in Computer Science, vot. 300. Springer-Verlag, New York, 1988.]] Google Scholar
- 4 ALLEN, J. Dependence analysis for subscripted variables and its applications to program transformations. Ph.D. thesis, Rice Univ., Houston, Tex., 1983.]] Google Scholar
- 5 ALLEN, R., AND KENNEDY, K. Automatic translation of FORTRAN programs to vector form. ACM Trans. Programm. Lang. Syst. 9, 4 (Oct. 1987).]] Google Scholar
- 6 APPEL, A.W. All efficient program for many-body simulation. SIAM J. Sci. Stat. Comput. 6, 1 (1985), 85-103.]]Google Scholar
- 7 BAKER, H. Unify and conquer (garbage, updating, aliasing,...) in functional languages. In Proceedings of the '90 ACM Conference on LISP and Functwnal Programming (June 1990). ACM, New York.]] Google Scholar
- 8 BANERJEE, U. Dependence Analysis for Supercomputing. Kluwer, 1988.]] Google Scholar
- 9 BANERJEE, U. Speedup of ordinary programs. Ph.D. thesis, Dept. of Computer Science Rep. 79-989, Univ. of Illinois at Urbana-Champaign, Urbana, Ill., 1979.]] Google Scholar
- 10 BARNES, J., AND HUT, P. A hierarchical O(N log N) force-calculation algorithm. Nature 324 (Dec. 4, 1986), 446-449. Can be obtained from J. Barnes at the University of Hawaii.]]Google Scholar
- 11 BURKE, M., AND CYTRON, R. Interprocedural dependence analysis and parallelization. In Proceedings of the SIGPLAN '86 Symposzum on Compiler Construction. ACM SIGPLAN Not. 21, 7 (July 1986), 162-175.]] Google Scholar
- 12 CHASE, D. R., WEOMAN, M., AND ZADEK, F. K. Analysis of pointers and structures. In Proceedings of the SIGPLAN '90 Conference on Programming Language Design and Implementation (1990). ACM, New York, 296-310.]] Google Scholar
- 13 CONVEX COMPUTER CORPORATION. CONVEX C and FORTRAN Language Reference Manuals. Convex Computer Corp., 1990.]] Google Scholar
- 14 DEUTSCH, A. A storeless model of aliasing and its abstractions using finite representations of right-regular equivalence relations. In Proceedings of the IEEE '92 International Conference on Computer Languages (Apr. 1992). IEEE, New York.]]Google Scholar
- 15 DEUTSCH, A. On determining lifetime and aliasing of dynamically allocated data in higherorder functional specifications. In Proceedings of the ACM 17th Symposium on Principles of Programming Languages (1990). ACM, New York, 157-168.]] Google Scholar
- 16 DONGARRA, J. J., AND HINDS, A. R. Unrolling loops in FORTRAN. Softw.-Pract. Exper. 9 (1979), 219-226.]]Google Scholar
- 17 EBCIOGLU, K., AND NAKATANI, T. A new compilation technique for parallelizing loops with unpredictable branches on a VLIW architecture. In Proceedings of the 2nd Workshop on Programming Languages and Compilers for Parallel Computing. Research Monographs in Parallel and Distributed Computing. The MIT Press, Cambridge, Mass., 1989.]] Google Scholar
- 18 GAO, G. R., WONG, Y. B., AND NING, Q. A Petri-Net model for fine-grain loop scheduling. In Proceedings of the SIGPLAN 1991 Conference on Programming Language Design and implementation (June 1991). ACM, New York, 204-218.]] Google Scholar
- 19 GUARNA, V. A., JR., GANNON, D., GAUR, Y., AND JABLONOWSK!, D. Faust: An environment for programming parallel scientific applications. In Supercomputing '88 (1988).]] Google Scholar
- 20 HARRISON, W. a., III The interprocedural analysis and automatic parallelization of Scheme programs. Lisp Symb. Comput. 2, 3/4 (1989), 179-396.]]Google Scholar
- 21 HARRISON, W. L., III, AND AMMARGUELLAT, Z. A program's eye view of Miprac. in Proceedrags of the 5th Workshop on Languages and Compilers for Parallel Computing (Aug. 1992). Also Yale Tech. Rep. YALEU/DCS/RR-915, Yale Univ., New Haven, Conn.]] Google Scholar
- 22 HENDREN, L.J. Parallelizing programs with recursive data structures. Ph.D. thesis, Tech. Rep. TR 90-1114, Cornell Univ., Ithaca, N.Y., 1990.]] Google Scholar
- 23 HENDREN, L. J., AND GAO, G.R. Designing programming languages for analyzability: A fresh look at pointer data structures. In Proceedings of the 4th IEEE International Conference on Computer Languages (Apr. 1992). IEEE, New York.]]Google Scholar
- 24 HENDREN, L. J., AND NICOLAU, A. Parallelizing programs with recursive data structures. IEEE Trans. Parall. Distrib. Comput. 1, 1 (Jan. 1990), 35-47.]] Google Scholar
- 25 HENDREN, L. J., HUMMEL, J., AND NICOLAU, A. Abstractions for recursive pointer data structures: Improving the analysis and transformation of imperative programs. In Proceedings of the SIGPLAN '92 Conference on Programming Language Design and Implementation (June 1992). ACM, New York, 249-260.]] Google Scholar
- 26 HORWITZ, S., PFEIFFER, P., AND REPS, T. Dependence analysis for pointer variables. In Proceedings of the SIGPLAN '89 Conference on Programming Language Design and Implementation (June 1989). ACM, New York, 28-40.]] Google Scholar
- 27 HUELSBERGEN, L., AND LARUS, J. Dynamic program parallelization. In Proceedings of the '92 ACM Conference on LISP and Functional Programming (June 1992). ACM, New York, 311-323.]] Google Scholar
- 28 HUMMEL, J., HENDREN, L. J., AND NICOLAU, A. Applying an abstract data structure description approach to parallelizing scientific pointer programs. In Proceedings of the 21st Annual International Conference on Parallel Processing, Volume H (Aug. 1992). 100-104.]]Google Scholar
- 29 INOUE, K., SEKI, H., AND YAGI, H. Analysis of functional programs to detect run-time garbage cells. ACM Trans. Program. Lang. Syst. 10, 4 (Oct. 1988), 555-578.]] Google Scholar
- 30 JONES, N. D., AND MUCHNICK, S. S. Program Flow Analysis, Theory and Applications. rentice-Hall, Englewood Cliffs, N.J., 1981, 102-131.]] Google Scholar
- 31 I~NNEDY, K. Foreword. In Supercompilers for Parallel and Vector Computers, ACM Press, New York, 1990.]]Google Scholar
- 32 KLAPPHOLZ, D., KALLIS, A. D., AND gANG, X. Refined C: An update. In Languages and Compilers for Parallel Computing. The MIT Press, Cambridge, Mass., 1990. 331-357.]] Google Scholar
- 33 KUCK, D., BUDNIK, P., CHEN, S., LAWRIE, D., TOWLE, R., STREBENDT, R., DAVIS, E., HAN, J., KRASKA, P., AND MURAOKA, Y. Measurements of parallelism in ordinary FORTRAN programs. Computer 7, 1 (Jan. 1974), 37-46.]]Google Scholar
- 34 LAM, M. Software pipelining: An effective scheduling technique for VLIW machines. In Proceedings of the SIGPLAN 1988 Conference on Programming Language Design and Implementation (June 1988). ACM, New York, 318-328.]] Google Scholar
- 35 LANDI, W., AND RYDER, B. A safe approximation algorithm for interprocedural pointer aliasing. In Proceedings of the SIGPLAN '92 Conference on Programming Language Design and Implementation (June 1992). ACM, New York, 235-248.]] Google Scholar
- 36 LARUS, J.R. Restructuring symbolic programs for concurrent execution on multiprocessors. Ph.D. thesis, Univ. of California, Berkeley, 1989.]] Google Scholar
- 37 LARUS, J. R., AND HILFINGER, P. N. Detecting conflicts between structure accesses. In Proceedings of the SIGPLAN '88 Conference on Programming Language Design and Implementation (June 1988). ACM, New York, 21-34.]] Google Scholar
- 38 LUCASSEN, J. M., AND GIFFORD, D.K. Polymorphic effect systems. In Proceedings of the 15th ACM Symposium on Principles of Programming Languages (1988). ACM, New York, 47-57.]] Google Scholar
- 39 PADUA, D. A., AND WOLFE, M. J. Advanced compiler optimization for supercomputers. Commun. ACM 29, 12 (Dec. 1986).]] Google Scholar
- 40 PUGH, W. Skip lists: A probabilistic alternative to balanced trees. Commun. ACM 33, 6 (June 1990), 668-676.]] Google Scholar
- 41 RAU, B. R., AND GLAESER, C. D. Efficient code generation for horizontal architectures: Compiler techniques and architectural support. In Proceedings of the 9th Symposium on Computer Architecture (Apr. 1982).]] Google Scholar
- 42 RUGGIERI, C., AND MURTAGH, T. P. Lifetime analysis of dynamically allocated objects. In Proceedings of the 15th ACM Symposium on Principles of Programming Languages (1988). ACM, New York, 285-293.]] Google Scholar
- 43 SAMET, H. The Design and Analysis of Spatial Data Structures. Addison-Wesley, Reading, Mass., 1990.]] Google Scholar
- 44 S~TODGRASS, R. The Interface Description Language: Definition and Use. Computer Science Press, 1989.]] Google Scholar
- 45 SOLWORTH, J.A. The PARSEQ project: An interim report. In Languages and Compilers for Parallel Computing, The MIT Press, Cambridge, Mass., 1990, 490-510.]] Google Scholar
- 46 WANG, E., AND HILFINGER, P. Analysis of recursive types in LISP-like languages. In Proceedings of the '92 ACM Conference on LISP and Functional Programming (June 1992). ACM, New York, 216-225.]] Google Scholar
- 47 WOLFE, M.J. Optimizing supercompilers for supercomputers. Ph.D. thesis, Univ. of Illinois at Urbana-Champaign, Urbana, Ill., 1982.]] Google Scholar
- 48 ZIMA, g., AND CHAPMAN, B. Supercompilers for Parallel and Vector Computers. ACM Press, New York, 1990.]] Google Scholar
- 49 ZIMA, H., BAST, H-J., AND GERNDT, M. Superb: A tool for semi-automatic MIMD/SIMD parallelization. Parall. Comput. 6 (1988), 1-18.]]Google Scholar
Index Terms
Abstract description of pointer data structures: an approach for improving the analysis and optimization of imperative programs
Recommendations
Interprocedural definition-use chains of dynamic pointer-linked data structures
This paper presents a flow-sensitive algorithm to compute interprocedural definition-use chains of dynamic pointer-linked data structures. The goal is to relate the statements that construct links of dynamic pointer-linked data structures (i.e. ...
Abstractions for recursive pointer data structures: improving the analysis and transformation of imperative programs
PLDI '92: Proceedings of the ACM SIGPLAN 1992 conference on Programming language design and implementationEven though impressive progress has been made in the area of optimizing and parallelizing programs with arrays, the application of similar techniques to programs with pointer data structures has remained difficult. In this paper we introduce a new ...
Interprocedural pointer alias analysis
We present practical approximation methods for computing and representing interprocedural aliases for a program written in a language that includes pointers, reference parameters, and recursion. We present the following contributions: (1) a framework ...








Comments