Flow Sensitivity without Control Flow Graph: An Efficient Andersen-Style Flow-Sensitive Pointer Analysis
Summary
Cg-FsPta is a novel Flow-Sensitive Constraint Graph (FSConsG) based pointer analysis designed to overcome the computational inefficiencies of traditional control flow graph (CFG) based methods. This approach utilizes the structural advantages of set-constraint graphs, commonly used in flow-insensitive analysis, while preserving flow sensitivity for variable definitions and uses. By separating variable representation from control flow, Cg-FsPta enables the application of sophisticated graph optimization and dynamic solving techniques. Experimental evaluations on the SPEC CPU 2017 benchmark suite demonstrate that Cg-FsPta significantly enhances efficiency. It achieves an average memory reduction of 33.05% and accelerates flow-sensitive pointer analysis by 7.27x compared to the leading VSFS method, especially when integrated with the Sfr technique. With the Wave propagation algorithm, it still provides a 1.93x speedup and 23.99% memory reduction, all while maintaining analytical precision.
Key takeaway
For research scientists developing static analysis tools, or software engineers working on compiler optimizations, Cg-FsPta presents a compelling alternative to traditional flow-sensitive pointer analysis. Its novel Flow-Sensitive Constraint Graph (FSConsG) approach delivers substantial efficiency gains, reducing memory usage by up to 33.05% and accelerating analysis by up to 7.27x, while preserving precision. You should explore integrating FSConsG-based methods to enhance the scalability and performance of your program analysis frameworks, especially for large C/C++ codebases.
Key insights
Cg-FsPta achieves flow-sensitive pointer analysis precision with flow-insensitive efficiency by using a simplified constraint graph.
Principles
- Separate variable representation from control flow for efficiency.
- Encode flow-sensitivity via versioned address-taken variables.
- Store all constraint information exclusively on graph edges.
Method
Cg-FsPta constructs a Flow-Sensitive Constraint Graph (FSConsG) from LLVM-IR, flow-insensitive analysis results, and a CFG. It converts top-level operations to FSConsG edges and maintains def-use relations for address-taken variables via versioning, then solves points-to sets iteratively.
In practice
- Apply graph simplification (cycle elimination, folding) to FSConsG.
- Integrate with Andersen's Wave or Sfr algorithms for solving.
- Analyze large-scale C/C++ programs more efficiently.
Topics
- Program Analysis
- Static Analysis
- Pointer Analysis
- Flow-Sensitive Analysis
- Constraint Graphs
- LLVM Intermediate Representation
- Performance Optimization
Best for: AI Scientist, Software Engineer, Research Scientist
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by cs.SE updates on arXiv.org.