paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Rapid: Region-Based Pointer Disambiguation

Rapid:基于区域的指针消歧
OOPSLA 7(OOPSLA2)2023匹配度 3/10 · 该论文属于传统编译优化与指针别名/消歧分析,虽与静态分析相关,但未涉及 LLM/Agent、浮点程序分析或贝叶斯程序分析,也未讨论 AI 与 PL 的结合。引用 2 inbox
Khushboo Chitre, Piyus Kedia, Rahul Purandare
crossref: 2026-09-10

AI 速览

一句话:Rapid 利用 profiler 将需消歧对象分配到不同对齐内存区域,使动态指针消歧检查无需访存,降低开销并提升循环优化性能。

跨过程别名分析常在精度与可扩展性间取舍,编译器因此使用较粗的过程内分析并错过优化。循环版本化结合动态检查可恢复优化,但已有方案或需 O(log n) 次访存,或依赖对象大小/对齐约束而增加分配器开销。本文提出 Rapid:用 profiler 识别需要消歧检查的对象,把它们分配到互不相交且对齐的内存区域,使任意不同区域对象的地址高 32 位必然不同;动态检查只比较区域,无需访存。评估中,Rapid 在 Polybench 上最大提升 52.94%,在 CPU SPEC 2017 上最大提升 1.88%;分配器最大 CPU 开销 0.57%,几何均值 -0.2%,并改进 12/16 个 SPEC 2017 基准,而对比方法仅改进 5 个。

问题
跨过程别名分析难以兼顾精度与可扩展性,现有动态指针消歧方案要么动态检查开销大,要么分配器开销显著,限制了循环优化机会。
方法
Rapid 用 profiler 选出需要消歧的对象,将其分配到不同且对齐的内存区域,使动态检查仅比较区域标识而无需访存。
评估
在 Polybench 与 CPU SPEC 2017 上评测,报告最大性能收益、分配器开销及可改进基准数量,并与最先进方法比较。
原文摘要(Abstract)

Interprocedural alias analyses often sacrifice precision for scalability. Thus, modern compilers such as GCC and LLVM implement more scalable but less precise intraprocedural alias analyses. This compromise makes the compilers miss out on potential optimization opportunities, affecting the performance of the application. Modern compilers implement loop-versioning with dynamic checks for pointer disambiguation to enable the missed optimizations. Polyhedral access range analysis and symbolic range analysis enable 𝑂 (1) range checks for non-overlapping of memory accesses inside loops. However, these approaches work only for the loops in which the loop bounds are loop invariants. To address this limitation, researchers proposed a technique that requires 𝑂 (𝑙𝑜𝑔 𝑛) memory accesses for pointer disambiguation. Others improved the performance of dynamic checks to single memory access by constraining the object size and alignment. However, the former approach incurs noticeable overhead due to its dynamic checks, whereas the latter has a noticeable allocator overhead. Thus, scalability remains a challenge. In this work, we present a tool, Rapid, that further reduces the overheads of the allocator and dynamic checks proposed in the existing approaches. The key idea is to identify objects that need disambiguation checks using a profiler and allocate them in different regions, which are disjoint memory areas. The disambiguation checks simply compare the regions corresponding to the objects. The regions are aligned such that the top 32 bits in the addresses of any two objects allocated in different regions are always different. As a consequence, the dynamic checks do not require any memory access to ensure that the objects belong to different regions, making them efficient. Rapid achieved a maximum performance benefit of around 52.94% for Polybench and 1.88% for CPU SPEC 2017 benchmarks. The maximum CPU overhead of our allocator is 0.57% with a geometric mean of -0.2% for CPU SPEC 2017 benchmarks. Due to the low overhead of the allocator and dynamic checks, Rapid could improve the performance of 12 out of 16 CPU SPEC 2017 benchmarks. In contrast, a state-of-the-art approach used in the comparison could improve only five CPU SPEC 2017 benchmarks.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot1898,
  title = {Rapid: Region-Based Pointer Disambiguation},
  author = {Khushboo Chitre and Piyus Kedia and Rahul Purandare},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {7},
  number = {OOPSLA2},
  year = {2023},
  doi = {10.1145/3622859}
}