Static Detection of Place Locality and Elimination of Runtime Checks

  • Shivali Agarwal
  • RajKishore Barik
  • V. Krishna Nandivada
  • Rudrapatna K. Shyamasundar
  • Pradeep Varma
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5356)


Harnessing parallelism particularly for high performance computing is a demanding topic of research. Limitations and complexities of automatic parallelization have led to programming language notations wherein a user programs parallelism explicitly and partitions a global address space for harnessing parallelism. X10 from IBM uses the notion of places to partition the global address space. The model of computation for such languages involves threads and data distributed over local and remote places. A computation is said to be place local if all the threads and data pertaining to it are at the same place. Analysis and optimizations targeting derivations of place-locality have recently gained ground with the advent of partitioned global address space (PGAS) languages like UPC and X10, wherein efficiency of place local accesses is performance critical.

In this paper, we present a novel framework for statically establishing place locality in X10. The analysis framework is based on a static abstraction of activities (threads) incorporating places and an extension to classical escape analysis to track the abstract-activities to which an object can escape. Using this framework, we describe an algorithm that eliminates runtime checks that are inserted by the X10 compiler to enforce place locality of data access. We also identify place locality checks that are guaranteed to fail. Our framework takes advantage of the high level abstraction of X10 distributions to reason about place locality of array accesses in loops as well. The underlying issues, the framework and its power are illustrated through a series of examples.


Place Locality Program Point Index Expression Abstract Place Array Access 
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.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Agarwal, S., Barik, R., Sarkar, V., Shyamasundar, R.K.: May-happen-in-parallel analysis of X10 programs. In: Proceedings of the 12th ACM SIGPLAN symposium on PPoPP, pp. 183–193 (2007)Google Scholar
  2. 2.
    Andersen, L.: Program Analysis and Specialization for the C Programming Language. PhD thesis, DIKU, University of Copenhagen (1994)Google Scholar
  3. 3.
    Bailey, D.H., Barszcz, E., Barton, J.T., Browning, D.S., Carter, R.L., Dagum, D., Fatoohi, R.A., Frederickson, P.O., Lasinski, T.A., Schreiber, R.S., Simon, H.D., Venkatakrishnan, V., Weeratunga, S.K.: The NAS Parallel Benchmarks. The International Journal of Supercomputer Applications 5(3), 63–73 (Fall 1991)CrossRefGoogle Scholar
  4. 4.
    Barik, R.: Efficient computation of may-happen-in-parallel information for concurrent java programs. In: Ayguadé, E., Baumgartner, G., Ramanujam, J., Sadayappan, P. (eds.) LCPC 2005. LNCS, vol. 4339. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  5. 5.
    Barton, C., Cascaval, C., Almasi, G., Zheng, Y., Farreras, M., Chatterjee, S., Amaral, J.N.: Shared memory programming for large scale machines. In: Proceedings of the Conference on PLDI, pp. 108–117 (2006)Google Scholar
  6. 6.
    Bodík, R., Gupta, R., Sarkar, V.: ABCD: eliminating array bounds checks on demand. In: Proceedings of the ACM SIGPLAN 2000 conference on PLDI, pp. 321–333 (2000)Google Scholar
  7. 7.
    Chandra, S., Saraswat, V.A., Sarkar, V., Bodík, R.: Type inference for locality analysis of distributed data structures. In: Proceedings of the 13th ACM SIGPLAN symposium on PPoPP, pp. 11–22. ACM, New York (2008)Google Scholar
  8. 8.
    Choi, J.-D., Gupta, M., Serrano, M., Sreedhar, V.C., Midkiff, S.: Escape analysis for java. In: Proceedings of the ACM SIGPLAN conference on OOPSLA, pp. 1–19 (1999)Google Scholar
  9. 9.
    Choi, J.-D., Gupta, M., Serrano, M.J., Sreedhar, V.C., Midkiff, S.P.: Stack allocation and synchronization optimizations for java using escape analysis. ACM Transactions on Programming Languages and Systems 25(6), 876–910 (2003)CrossRefGoogle Scholar
  10. 10.
    Hudak, P., Smith, L.: Para-functional programming: A paradigm for programming multiprocessor systems. In: Proc. of the ACM SIGPLAN Symposium on PoPP, pp. 243–254. ACM Press, New York (1986)Google Scholar
  11. 11.
    Huynh, T., Joskowicz, L., Lassez, C., Lassez, J.-L.: Reasoning about linear constraints using parametric queries. In: Veni Madhavan, C.E., Nori, K.V. (eds.) FSTTCS 1990. LNCS, vol. 472, pp. 1–20. Springer, Heidelberg (1990)CrossRefGoogle Scholar
  12. 12.
    Jagannathan, S., Thiemann, P., Weeks, S., Wright, A.K.: Single and loving it: Must-alias analysis for higher-order languages. In: Proceedings of the 25th ACM SIGPLAN Symposium on POPL (January 1998)Google Scholar
  13. 13.
    Jeremiassen, T.E., Eggers, S.J.: Reducing false sharing on shared memory multiprocessors through compile time data transformations. In: Proceedings of the Symposium on PPoPP, pp. 179–188 (1995)Google Scholar
  14. 14.
    Jones, R., King, A.: A fast analysis for thread-local garbage collection with dynamic class loading. In: Fifth IEEE International Workshop on Source Code Analysis and Manipulation, September 2005, pp. 129–138 (2005)Google Scholar
  15. 15.
    Kandemir, M., Choudhary, A., Ramanujam, J., Banerjee, P.: On reducing false sharing while improving locality on shared memory multiprocessors. In: Malyshkin, V.E. (ed.) PaCT 1999. LNCS, vol. 1662, pp. 203–211. Springer, Heidelberg (1999)Google Scholar
  16. 16.
    Kawahito, M., Komatsu, H., Nakatani, T.: Effective null pointer check elimination utilizing hardware trap. SIGPLAN Notices 35(11), 139–149 (2000)CrossRefGoogle Scholar
  17. 17.
    Muchnick, S.S.: Advanced Compiler Design and Implementation. Morgan Kaufmann, San Francisco (1997)Google Scholar
  18. 18.
    Nandivada, V.K., Detlefs, D.: Compile-time concurrent marking write barrier removal. In: Proceedings of the international symposium on CGO, pp. 37–48 (2005)Google Scholar
  19. 19.
    Naumovich, G., Avrunin, G.S.: A conservative data flow algorithm for detecting all pairs of statements that may happen in parallel. In: Proceedings of the ACM SIGSOFT International symposium on FSE, pp. 24–34 (1998)Google Scholar
  20. 20.
    Necula, G.C., McPeak, S., Weimer, W.: Ccured: type-safe retrofitting of legacy code. In: Proceedings of the 29th ACM SIGPLAN symposium on POPL, pp. 128–139. ACM, New York (2002)Google Scholar
  21. 21.
    Sagiv, M., Reps, T., Wilhelm, R.: Parametric shape analysis via 3-valued logic. ACM Transactions on Programming Languages and Systems 24(3), 217–298 (2002)CrossRefGoogle Scholar
  22. 22.
    Saraswat, V.: Report on the experimental language X10, (2006)Google Scholar
  23. 23.
    Shuf, Y., Gupta, M., Franke, H., Appel, A., Singh, J.P.: Creating and preserving locality of java applications at allocation and garbage collection times. In: Proceedings of the conference on OOPSLA, pp. 13–25 (2002)Google Scholar
  24. 24.
    Steensgaard, B.: Thread-specific heaps for multi-threaded programs. In: Proceedings of the 2nd international symposium on Memory management, pp. 18–24 (2000)Google Scholar
  25. 25.
    Whaley, J., Rinard, M.: Compositional pointer and escape analysis for Java programs. In: Proceedings of the 14th ACM SIGPLAN conference OOPSLA, pp. 187–206 (1999)Google Scholar
  26. 26.
    Zhu, Y., Hendren, L.: Locality analysis for parallel C programs. IEEE Transactions on Parallel and Distributed Systems 10(2), 99–114 (1999)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2008

Authors and Affiliations

  • Shivali Agarwal
    • 1
  • RajKishore Barik
    • 1
  • V. Krishna Nandivada
    • 1
  • Rudrapatna K. Shyamasundar
    • 1
  • Pradeep Varma
    • 1
  1. 1.IBM India Research LabNew DelhiIndia

Personalised recommendations