Lune

OOPSLA2022Top-tier venue

The road not taken: exploring alias analysis based optimizations missed by the compiler

Khushboo Chitre, Piyus Kedia, Rahul Purandare

Abstract

Context-sensitive inter-procedural alias analyses are more precise than intra-procedural alias analyses. However, context-sensitive inter-procedural alias analyses are not scalable. As a consequence, most of the production compilers sacrifice precision for scalability and implement intra-procedural alias analysis. The alias analysis is used by many compiler optimizations, including loop transformations. Due to the imprecision of alias analysis, the program's performance may suffer, especially in the presence of loops.

Previous work proposed a general approach based on code-versioning with dynamic checks to disambiguate pointers at runtime. However, the overhead of dynamic checks in this approach is 𝑂 (𝑙𝑜𝑔 𝑛), which is substantially high to enable interesting optimizations. Other suggested approaches, e.g., polyhedral and symbolic range analysis, have 𝑂 (1) overheads, but they only work for loops with certain constraints. The production compilers, such as LLVM and GCC, use scalar evolution analysis to compute an 𝑂 (1) range check for loops to resolve memory dependencies at runtime. However, this approach also can only be applied to loops with certain constraints.

In this work, we present our tool, Scout, that can disambiguate two pointers at runtime using single memory access. Scout is based on the key idea to constrain the allocation size and alignment during memory allocations. Scout can also disambiguate array accesses within a loop for which the existing 𝑂 (1) range checks technique cannot be applied. In addition, Scout uses feedback from static optimizations to reduce the number of dynamic checks needed for optimizations.

Our technique enabled new opportunities for loop-invariant code motion, dead store elimination, loopvectorization, and load elimination in an already optimized code. Our performance improvements are up to 51.11% for Polybench and up to 0.89% for CPU SPEC 2017 suites. The geometric means for our allocator's CPU and memory overheads for CPU SPEC 2017 benchmarks are 1.05%, and 7.47%, respectively. For Polybench benchmarks, the geometric mean of CPU and memory overheads are 0.21% and 0.13%, respectively.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

3 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • A Framework for Fine-Grained Program Versioning cites Rapid: Region-Based Pointer Disambiguation
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers3

  1. Combining Structured Static Code Information and Dynamic Symbolic Traces for Software Vulnerability PredictionHuanting Wang, Zhanyong Tang, Shin Hwei Tan, Jie Wang et al.ICSE 2024 · 15 citations
  2. Rapid: Region-Based Pointer DisambiguationKhushboo Chitre, Piyus Kedia, Rahul PurandareOOPSLA 2023 · 2 citations
  3. A Framework for Fine-Grained Program VersioningYishen Chen, Saman P. AmarasingheMICRO 2024 · 1 citation

Related papers

  1. Relaxing Alias Analysis: Exploring the Unexplored SpaceMichel Weber, Theodoros Theodoridis, Zhendong SuPLDI 2025 · 1 citation
  2. OOElala: order-of-evaluation based alias analysis for compiler optimizationAnkush Phulia, Vaibhav Bhagee, Sorav BansalPLDI 2020 · 9 citations
  3. GPU-Accelerated Flow-Sensitive Pointer Analysis for C/C++ ProgramsJiaqi He, Karim AliFSE 2026
  4. SCAF: a speculation-aware collaborative dependence analysis frameworkSotiris Apostolakis, Ziyang Xu, Zujun Tan, Greg Chan et al.PLDI 2020 · 12 citations
  5. Precise Sparse Abstract Execution via Cross-Domain InteractionXiao Cheng, Jiawei Wang, Yulei SuiICSE 2024 · 6 citations
Dusk over the sea between two cliffs drawn in fine vertical lines