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

PIP:使Andersen的点到分析在不完整的C程序中更加准确和实用

PIP: Making Andersen's Points-to Analysis Sound and Practical for Incomplete C Programs

Norwegian University of Science and Technology(挪威科技大学)

Håvard Rognebakke Krogstie, Helge Bahmann, Magnus Själander, Nico Reissmann

AI总结:

本文提出PIP技术,通过隐式跟踪点针提升不完整C程序点到分析的正确性与效率,减少显式点针使用,提升求解器性能。

摘要:

单独编译文件本身适合并行化,但迫使编译器必须处理不完整的程序。最先进的点到分析只能保证在完整程序中的解决方案正确性,要求汇总函数描述任何缺失的程序部分。然而,在生产编译器中,汇总函数很少可用,而正确性和效率是不可妥协的。本文提出了一种Andersen风格的点到分析,能够高效地为不完整的C程序生成正确的解决方案。该分析通过跟踪从外部模块可访问的内存位置和指针来保证正确性,并通过在约束图中隐式执行此跟踪来提高效率。我们展示了隐式点针跟踪使约束求解器比任何组合使用五种不同先进技术的显式点针跟踪方法快15倍。我们还提出了Prefer Implicit Pointees(PIP)技术,进一步减少显式点针的使用。PIP相比不受益于PIP的最快求解器配置,速度提高了1.9倍。分析的精度通过别名分析客户端进行评估,其将MayAlias响应数量比LLVM的BasicAA pass单独减少了40%。最后,我们展示了该分析在内存方面的可扩展性,使其适合实际优化编译器。

英文摘要:

Compiling files individually lends itself well to parallelization, but forces the compiler to operate on incomplete programs. State-of-the-art points-to analyses guarantee sound solutions only for complete programs, requiring summary functions to describe any missing program parts. Summary functions are rarely available in production compilers, however, where soundness and efficiency are non-negotiable. This paper presents an Andersen-style points-to analysis that efficiently produces sound solutions for incomplete C programs. The analysis accomplishes soundness by tracking memory locations and pointers that are accessible from external modules, and efficiency by performing this tracking implicitly in the constraint graph. We show that implicit pointee tracking makes the constraint solver 15$\times$ faster than any combination of five different state-of-the-art techniques using explicit pointee tracking. We also present the Prefer Implicit Pointees (PIP) technique that further reduces the use of explicit pointees. PIP gives an additional speedup of 1.9$\times$, compared to the fastest solver configuration not benefiting from PIP. The precision of the analysis is evaluated in terms of an alias-analysis client, where it reduces the number of MayAlias-responses by 40% compared to LLVM's BasicAA pass alone. Finally, we show that the analysis is scalable in terms of memory, making it suitable for optimizing compilers in practice.

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

↑