Pointer Alignment Computation via Equivalence Class Mapping
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing pointer analysis methods are resource-intensive and less efficient for large programs, particularly when translating to pointer alignment analysis, which requires precise alignment information for performance optimizations.
Innovation Solution
A computer-implemented method using flow-insensitive and field-sensitive unification-based pointer analysis to compute equivalence classes of pointers, identifying candidate pointers for alignment computation, and providing alignment information to the compiler for optimization, which is simpler and cheaper in terms of computation time.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If flow-sensitive pointer analysis is used to achieve precise pointer alignment information, then measurement precision is improved, but computation time and resource consumption increase significantly
Solution Approach 1:
The patent applies field-sensitive analysis selectively to pointer fields that require precise alignment information, rather than performing flow-sensitive analysis on all pointers. This localized approach maintains measurement precision for critical pointers while reducing overall computation time by avoiding exhaustive analysis of every pointer in the program.
Solution Approach 2:
The patent performs partial flow-sensitive analysis only on selected equivalence classes of pointers that are candidates for alignment computation, rather than performing complete flow-sensitive analysis on all pointers. This partial action achieves sufficient precision for alignment purposes without the full computational cost of exhaustive analysis.
2Loss of information
If comprehensive pointer analysis is performed on all pointers in large programs, then alignment information completeness is improved, but device complexity and resource utilization worsen
Solution Approach 1:
The patent extracts and identifies only the necessary equivalence classes of pointers that are candidates for alignment computation, separating them from the rest of the pointer set. This extraction approach ensures that alignment information is obtained for all necessary pointers while avoiding the complexity of analyzing every single pointer in large programs.
Solution Approach 2:
The patent segments the pointer analysis process into distinct phases: equivalence class formation, candidate identification through code pattern analysis, and alignment computation. This segmentation reduces device complexity by breaking down the comprehensive analysis into manageable, modular steps that can be executed efficiently.
3Loss of information
If existing pointer analysis methods are applied to large programs, then analysis coverage is improved, but productivity and execution efficiency deteriorate
Solution Approach 1:
The patent performs preliminary flow-insensitive equivalence class formation and code pattern analysis to identify candidate pointers before performing the more expensive alignment computation. This preliminary action ensures comprehensive coverage is maintained while improving productivity by preparing data structures and candidate sets in advance, avoiding redundant analysis during the main compilation pass.
Data Source
AI summary
Pointer alignment in a computer programming to obtain information enabling a compiler to optimize program code. Equivalence classes of pointers are collected in a program using a flow-insensitive yet field-sensitive pointer analysis operation iterating through an entire program code of the program. The equivalence classes of pointers, once collected, are mapped to and recorded in an equivalence class mapping table (ECTable). A portion of the collected equivalence classes of pointers are identified, from the ECTable, as pointer candidates for a pointer alignment computation according to a code pattern analysis of each pointer candidate. The code pattern analysis is based on available alignment information, and whether the alignment information would enable a compiler to optimize pointer references of the candidate pointer. The pointer alignment computation is then performed for each identified pointer candidate to obtain the alignment information used to optimize execution of the program.


