arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1112.5000cs.PL
收藏

惰性指针分析

Lazy Pointer Analysis

Uday P. Khedker, Alan Mycroft, Prashant Singh Rawat

摘要:

流和上下文敏感的指针分析通常被认为对于大型程序来说太昂贵了;大多数工具都放松了对可伸缩性的一个或两个要求。我们制定了一个流量和上下文敏感的点,以分析,是懒惰的,在以下意义上:点的信息计算只活指针和它的传播是稀疏的(限制到活范围内的各个指针)。此外,我们的分析(a)使用强活性,有效地包括死代码消除;(b)之后从may-points-to信息计算must-points-to信息,而不是使用相互固定点;(c)在过程间分析期间使用基于值的调用字符串终止(这显著减少了调用字符串的数量)。我们在GCC-4.6.0中的分析的一个简单实现给出了SPEC 2006的分析时间和点到测量的大小。使用活性将指向信息的数量减少了一个数量级,而不损失精度。对于30 kLoC以下的所有程序,我们发现结果比gcc的分析精确得多。然而,令人惊喜的是,在这个交叉点之下,我们天真的链表实现比主要用于效率的流和上下文不敏感的分析更快。我们推测,惰性流和上下文敏感的分析可能不仅更精确,而且更有效,比目前的方法。

英文摘要:

Flow- and context-sensitive pointer analysis is generally considered too expensive for large programs; most tools relax one or both of the requirements for scalability. We formulate a flow- and context-sensitive points-to analysis that is lazy in the following sense: points-to information is computed only for live pointers and its propagation is sparse (restricted to live ranges of respective pointers). Further, our analysis (a) uses strong liveness, effectively including dead code elimination; (b) afterwards calculates must-points-to information from may-points-to information instead of using a mutual fixed-point; and (c) uses value-based termination of call strings during interprocedural analysis (which reduces the number of call strings significantly). A naive implementation of our analysis within GCC-4.6.0 gave analysis time and size of points-to measurements for SPEC2006. Using liveness reduced the amount of points-to information by an order of magnitude with no loss of precision. For all programs under 30kLoC we found that the results were much more precise than gcc's analysis. What comes as a pleasant surprise however, is the fact that below this cross-over point, our naive linked-list implementation is faster than a flow- and context-insensitive analysis which is primarily used for efficiency. We speculate that lazy flow- and context-sensitive analyses may be not only more precise, but also more efficient, than current approaches.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑