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

Enable set_nonzero_bits to handle pointers.

Allows set_nonzero_bits to process pointers, leveraging global ranges.

The set_nonzero_bits function in tree-ssanames.cc is updated to handle pointers directly. Previously, pointers required specialized handling. With prange now acting as a proper global range, pointers can be processed by set_nonzero_bits without special cases, simplifying the code and improving analysis accuracy.

In Details

This commit modifies set_nonzero_bits in tree-ssanames.cc to directly handle pointers, removing prior specialization. This is enabled by the change where prange (pointer range) is now a true global range. This means pointer properties, including non-zero bits information, can be managed uniformly within the range framework, rather than requiring separate logic. The function maybe_set_nonzero_bits in tree-ssa-dom.cc is also adjusted to avoid pointer specialization.

For Context
set_nonzero_bits
A function likely used in SSA form to establish or update information about which bits are guaranteed to be non-zero for a given value.
prange
Pointer range. Represents the range of possible values or addresses that a pointer can hold.
SSA
Static Single Assignment form. An intermediate representation in compilers where every variable is assigned exactly once, simplifying many analyses and optimizations.
global range
A range of values or properties associated with a variable that is valid throughout the entire program or a significant portion of it, as opposed to a local range within a specific basic block.
Filed Under: gccssapointer analysisoptimization