GCC Newspaper
NOVEMBER 30, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
gcc

Adjust ptr_info_align API to take an ssa name

GCC's `ptr_info_align` API now accepts an SSA name directly, simplifying pointer alignment queries.

The API for querying pointer alignment information in GCC has been adjusted to accept an SSA name directly, rather than requiring a ptr_info_def structure obtained from a prange_storage. This change simplifies client calls and facilitates the eventual removal of the ptr_info_def structure by reducing references to it.

In Details

This commit modifies the ptr_info_align family of functions in GCC's tree-ssa infrastructure (tree-ssanames.cc, tree-ssanames.h). Previously, these functions required a ptr_info_def structure obtained via get_ptr_info(). The API is now changed to accept an SSA name directly. This reduces indirection and simplifies calls to functions like get_pointer_alignment_1, lower_builtin_assume_aligned, and various tree-ssa pass functions. The removal of adjust_ptr_info_misalignment and adjustments to get_ptr_info further support the ongoing cleanup of pointer information handling.

For Context
SSA
Static Single Assignment. An intermediate representation in compilers where every variable is assigned a value exactly once.
alignment
The requirement that data be stored in memory at an address that is a multiple of some value.
ptr_info_def
A structure used in GCC to hold information about pointers, including their alignment and potential aliasing.
prange_storage
A data structure within GCC used to store range information for values, particularly relevant in pointer analysis and optimization passes.
Filed Under: gccssaoptimizationrefactor