Precise Call Graph Construction for OO Programs in the Presence of Virtual Functions

  • Authors:
  • Deepankar Bairagi;Dharma P. Agrawal;Sandeep Kumar

  • Affiliations:
  • -;-;-

  • Venue:
  • ICPP '97 Proceedings of the international Conference on Parallel Processing
  • Year:
  • 1997

Quantified Score

Hi-index 0.00

Visualization

Abstract

Several intra- and inter-procedural program analysis techniques form the backbone of an optimizing and parallelizing compiler. The efficacy of these analyses depends upon how precise the call graph is. However, due to lack of exact type information for objects in an object-oriented (OO) program, the existing call graph construction algorithms are rendered imprecise. In this paper, we present an algorithm for constructing a more precise call graph by exploiting the static class hierarchy of an OO program. The information collected during the class hierarchy analysis helps in avoiding unnecessary addition of many spurious call graph edges for virtual-function calls. We have implemented our algorithm for handling C++ programs within a restructuring tool, Sage++. With our precise algorithm for call graph construction, the percentage reduction in the number of nodes and edges in the call graphs for the benchmark programs we had selected, ranged between 4% to 56% and between 22% to 58%, respectively.