Precise call graph construction for OO programs in the presence of virtual functions

Deepa B. Bairagi, D. Agrawal, Sandeep Kumar
{"title":"Precise call graph construction for OO programs in the presence of virtual functions","authors":"Deepa B. Bairagi, D. Agrawal, Sandeep Kumar","doi":"10.1109/ICPP.1997.622674","DOIUrl":null,"url":null,"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.","PeriodicalId":221761,"journal":{"name":"Proceedings of the 1997 International Conference on Parallel Processing (Cat. No.97TB100162)","volume":"208 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1997-08-11","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"7","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 1997 International Conference on Parallel Processing (Cat. No.97TB100162)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICPP.1997.622674","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 7

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.
在存在虚函数的情况下,OO程序的精确调用图构造
几个程序内和程序间的程序分析技术构成了优化和并行编译器的主干。这些分析的有效性取决于调用图的精确程度。然而,由于在面向对象(OO)程序中缺乏精确的对象类型信息,现有的调用图构造算法变得不精确。本文提出了一种利用面向对象程序的静态类层次结构构造更精确的调用图的算法。在类层次结构分析期间收集的信息有助于避免不必要地为虚拟函数调用添加许多虚假的调用图边。我们已经在一个重构工具Sage++中实现了处理c++程序的算法。使用我们用于调用图构建的精确算法,我们选择的基准程序的调用图中节点和边的数量减少百分比分别在4%到56%和22%到58%之间。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信