An Empirical Study of Function Pointers Using SPEC Benchmarks
Since the C language imposes little restriction on the use of function pointers, the task of call graph construction for C programs is far more dificult than that found in Fortran programs. From the experience of implementing a call graph extractor in the IMPACT compiler, we found the call graph construction problem has evolved into an interprocedural pointer analysis problem. In this paper, we report several interesting function pointer usage patterns found in the SPECint92 and SPECint95 benchmarks. They can be considered as critical issues in the design of a complete call graph extractor.
KeywordsFunction Pointer Call Graph Type Cast Spec Benchmark Dynamic Memory Allocation
Unable to display preview. Download preview PDF.
- 1.A. Lakhotia, Constructing call multigraphs using dependence graphs, in Conference Record of the 20th Annual ACM Symposium on Principles of Programming Languages, January 1993.Google Scholar
- 2.M. W. Hall and K. Kennedy, Efficient call graph analysis, ACM Letters on Programming Languages and Systems, vol. 1, pp. 227–242, September 1992.Google Scholar
- 3.B. C. Cheng and W. W. Hwu, A practical interprocedural pointer analysis framework, Tech. Rep. IMPACT-99-01, Center for Reliable and High-Performance Computing, University of Illinois, Urbana, IL, 1999.Google Scholar
- 4.B. Cheng and W. W. Hwu, An empirical study of function pointers using spec benchmarks, Tech. Rep. IMPACT-99-02, Center for Reliable and High-Performance Computing, University of Illinois, Urbana, IL, May 1999.Google Scholar