International Journal of Parallel Programming

, Volume 28, Issue 6, pp 537–562

Automatic Parallelization of Recursive Procedures

  • Manish Gupta
  • Sayak Mukhopadhyay
  • Navin Sinha

DOI: 10.1023/A:1007560600904

Cite this article as:
Gupta, M., Mukhopadhyay, S. & Sinha, N. International Journal of Parallel Programming (2000) 28: 537. doi:10.1023/A:1007560600904


Parallelizing compilers have traditionally focussed mainly on parallelizing loops. This paper presents a new framework for automatically parallelizing recursive procedures that typically appear in divide-and-conquer algorithms. We present compile-time analysis, using powerful, symbolic array section analysis, to detect the independence of multiple recursive calls in a procedure. This allows exploitation of a scalable form of nested parallelism, where each parallel task can further spawn off parallel work in subsequent recursive calls. We describe a runtime system which efficiently supports this kind of nested parallelism without unnecessarily blocking tasks. We have implemented this framework in a parallelizing compiler, which is able to automatically parallelize programs like quicksort and mergesort, written in C. For cases where even the advanced compile-time analysis we describe is not able to prove the independence of procedure calls, we propose novel techniques for speculative runtime parallelization, which are more efficient and powerful in this context than analogous techniques proposed previously for speculatively parallelizing loops. Our experimental results on an IBM G30 SMP machine show good speedups obtained by following our approach.

automatic parallelizationrecursive proceduresdivide and conquersymbolic analysisarray section analysisspeculative parallelization

Copyright information

© Plenum Publishing Corporation 2000

Authors and Affiliations

  • Manish Gupta
    • 1
  • Sayak Mukhopadhyay
    • 2
  • Navin Sinha
    • 3
  1. 1.T. J. Watson Research CenterIBMYorktown Heights
  2. 2.Mobius Management SystemsRye
  3. 3.IBM Global Services IndiaBangaloreIndia