Skip to main content

Unified Analysis of Array and Object References in Strongly Typed Languages

  • Conference paper
Static Analysis (SAS 2000)

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

Included in the following conference series:

Abstract

We present a simple, unified approach for the analysis and optimization of object field and array element accesses in strongly typed languages, that works in the presence of object references/pointers. This approach builds on Array SSA form [14], a uniform representation for capturing control and data flow properties at the level of array elements. The techniques presented here extend previous analyses at the array element level [15] to handle both array element and object field accesses uniformly.

In the first part of this paper, we show how SSA-based program analyses developed for scalars and arrays can be extended to operate on object references in a strongly typed language like Java. The extension uses Array SSA form as its foundation by modeling object references as indices into hypothetical heap arrays. In the second part of this paper, we present two new sparse analysis algorithms using the heap array representation; one identifies redundant loads, and the other identifies dead stores. Using strong typing to help disambiguation, these algorithms are more efficient than equivalent analyses for weakly typed languages. Using the results of these algorithms, we can perform scalar replacement transformations to change operations on object fields and array elements into operations on scalar variables.

We present preliminary experimental results using the Jalapeño optimizing compiler infrastructure. These results illustrate the benefits obtained by performing redundant load and dead store elimination on Java programs. Our results show that the (dynamic) number of memory operations arising from array-element and object-field accesses can be reduced by up to 28%, resulting in execution time speedups of up to 1.1×.

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. Alpern, B., Wegman, M.N., Zadeck, F.K.: Detecting Equality of Variables in Programs. In: Fifteenth ACM Principles of Programming Languages Symposium, San Diego, CA, pp. 1–11 (January 1988)

    Google Scholar 

  2. Bodik, R., Gupta, R.: Array Data-Flow Analysis for Load-Store Optimizations in Superscalar Architectures. In: Huang, C.-H., Sadayappan, P., Banerjee, U., Gelernter, D., Nicolau, A., Padua, D.A. (eds.) LCPC 1995. LNCS, vol. 1033, pp. 1–15. Springer, Heidelberg (1996)

    Chapter  Google Scholar 

  3. Burke, M.G., Choi, J.-D., Fink, S., Grove, D., Hind, M., Sarkar, V., Serrano, M.J., Sreedhar, V.C., Srinivasan, H., Whaley, J.: The Jalapeño Dynamic Optimizing Compiler for Java. In: ACM Java Grande Conference (June 1999)

    Google Scholar 

  4. Callahan, D., Carr, S., Kennedy, K.: Improving Register Allocation for Subscripted Variables. In: Proceedings of the ACM SIGPLAN 1990 Conference on Programming Language Design and Implementation, pp. 53–65. White Plains, New York (1990)

    Google Scholar 

  5. Carr, S., Kennedy, K.: Scalar Replacement in the Presence of Conditional Control Flow. Software—Practice and Experience (1), 51–77 (1994)

    Google Scholar 

  6. Chase, D.R., Wegman, M., Zadeck, F.K.: Analysis of Pointers and Structures. In: Proceedings of the ACM SIGPLAN 1990 Conference on Programming Language Design and Implementation, vol. 25(6), pp. 296–310. White Plains, New York, (1990)

    Google Scholar 

  7. Choi, J.-D., Burke, M., Carini, P.: Efficient flow-sensitive interprocedural computation of pointer-induced aliases and side effects. In: 20th Annual ACM SIGACT-SIGPLAN Symposium on the Principles of Programming Languages, pp. 232–245 (January 1993)

    Google Scholar 

  8. Choi, J.-D., Cytron, R., Ferrante, J.: Automatic Construction of Sparse Data Flow Evaluation Graphs. In: Conference Record of the Eighteenth Annual ACM Symposium on Principles of Programming Languages (January 1991)

    Google Scholar 

  9. The Standard Performance Evaluation Corporation. SPEC JVM98 Benchmarks (1998), http://www.spec.org/osg/jvm98/

  10. Cytron, R., Ferrante, J., Rosen, B.K., Wegman, M.N., Zadeck, F.K.: Efficiently Computing Static Single Assignment Form and the Control Dependence Graph. ACM Transactions on Programming Languages and Systems 13(4), 451–490 (1991)

    Article  Google Scholar 

  11. Diwan, A., McKinley, K.S., Moss, J.E.B.: Type-based alias analysis. In: SIGPLAN 1998 Conference on Programming Language Design and Implementation, pp. 106–117 (May 1998)

    Google Scholar 

  12. Ghiya, R., Hendren, L.J.: Puttingp ointer analysis to work. In: 25th Annual ACM SIGACT-SIGPLAN Symposium on the Principles of Programming Languages, pp. 121–133 (January 1998)

    Google Scholar 

  13. Hendren, L.J., Hummel, J., Nicolau, A.: Abstractions for recursive pointer data structures: Improvingthe analysis of imperative programs. In: Proceedings of the ACM SIGPLAN 1992 Conference on Programming Language Design and Implementation, pp. 249–260 (June 1992)

    Google Scholar 

  14. Knobe, K., Sarkar, V.: Array SSA form and its use in Parallelization. In: 25th Annual ACM SIGACT-SIGPLAN Symposium on the Principles of Programming Languages (January 1998)

    Google Scholar 

  15. Knobe, K., Sarkar, V.: Conditional constant propagation of scalar and array references using array SSA form. In: Levi, G. (ed.) SAS 1998. LNCS, vol. 1503, pp. 33–56. Springer, Heidelberg (1998)

    Google Scholar 

  16. Landi, W., Ryder, B.G., Zhang, S.: Interprocedural side effect analysis with pointer aliasing. In: Proceedings of the ACM SIGPLAN 1993 Conference on Programming Language Design and Implementation, pp. 56–67 (May 1993)

    Google Scholar 

  17. Larus, J.R., Hilfinger, P.N.: Detecting conflicts between structure accesses. In: Proceedings of the ACM SIGPLAN 1988 Conference on Programming Language Design and Implementation, vol. 23(7), pp. 21–34 (1988)

    Google Scholar 

  18. Muchnick, S.S.: Advanced Compiler Design & Implementation. Morgan Kaufmann Publishers, Inc., San Francisco (1997)

    Google Scholar 

  19. Pugh, W.: A new memory model for Java. Note sent to the Java Memory Model mailinglist (October 22,1999), http://www.cs.umd.edu/pugh/java/memoryModel

  20. Pugh, W.: Fixing the Java Memory Model. In: ACM Java Grande Conference (June 1999)

    Google Scholar 

  21. Rosen, B.K., Wegman, M.N., Zadeck, F.K.: Global Value Numbers and Redundant Computations. In: Fifteenth ACM Principles of Programming Languages Symposium, San Diego, CA, pp. 12–27 (January 1988)

    Google Scholar 

  22. Wolfe, M.J.: Optimizing Supercompilers for Supercomputers. In The series, Research Monographs in Parallel and Distributed Computing, Pitman, London and The MIT Press, Cambridge, Massachusetts (1989)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2000 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Fink, S., Knobe, K., Sarkar, V. (2000). Unified Analysis of Array and Object References in Strongly Typed Languages. In: Palsberg, J. (eds) Static Analysis. SAS 2000. Lecture Notes in Computer Science, vol 1824. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-45099-3_9

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-45099-3_9

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-67668-3

  • Online ISBN: 978-3-540-45099-3

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics