A framework for call graph construction algorithms

被引:120
作者
Grove, D
Chambers, C
机构
[1] IBM Corp, Thomas J Watson Res Ctr, Yorktown Hts, NY 10598 USA
[2] Univ Washington, Dept Comp Sci & Engn, Seattle, WA 98195 USA
来源
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS | 2001年 / 23卷 / 06期
关键词
call graph construction; control flow analysis; interprocedural analysis;
D O I
10.1145/506315.506316
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
A large number of call graph construction algorithms for object-oriented and functional languages have been proposed, each embodying different tradeoffs between analysis cost and call graph precision. In this article we present a unifying framework for understanding call graph construction algorithms and an empirical comparison of a representative set of algorithms. We first present a general parameterized algorithm that encompasses many well-known and novel call graph construction algorithms. We have implemented this general algorithm in the Vortex compiler infrastructure, a mature, multilanguage, optimizing compiler. The Vortex implementation provides a "level playing field" for meaningful cross-algorithm performance comparisons. The costs and benefits of a number of call graph construction algorithms are empirically assessed by applying their Vortex implementation to a suite of sizeable (5,000 to 50,000 lines of code) Cecil and Java programs. For many of these applications, interprocedural analysis enabled substantial speed-ups over an already highly optimized baseline. Furthermore, a significant fraction of these speed-ups can be obtained through the use of a scalable, near-linear time call graph construction algorithm.
引用
收藏
页码:685 / 746
页数:62
相关论文
共 63 条
[1]  
Agesen O, 1995, LECT NOTES COMPUT SC, V952, P2
[2]  
AGESEN O, 1993, LECT NOTES COMPUTER, V707, P247
[3]  
AGESEN O, 1996, 9652 SLMI STANF U
[4]  
AIKEN A, 1994, P 2 WORKSH PRINC PRA, P171
[5]  
ALT M, 1995, LNCS, V983, P33
[6]   The effectiveness of flow analysis for inlining [J].
Ashley, JM .
ACM SIGPLAN NOTICES, 1997, 32 (08) :99-111
[7]  
ASHLEY JM, 1996, 23 ACM SIGPLAN SIGAC, P184
[8]   Fast static analysis of C++ virtual function calls [J].
Bacon, DF ;
Sweeney, PF .
ACM SIGPLAN NOTICES, 1996, 31 (10) :324-341
[9]   Precise call graph construction for OO programs in the presence of virtual functions [J].
Bairagi, D ;
Kumar, S ;
Agrawal, DP .
PROCEEDINGS OF THE 1997 INTERNATIONAL CONFERENCE ON PARALLEL PROCESSING, 1997, :412-416
[10]   CONSTRUCTING THE PROCEDURE CALL MULTIGRAPH [J].
CALLAHAN, D ;
CARLE, A ;
HALL, MW ;
KENNEDY, K .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1990, 16 (04) :483-487