Handle pointers uniformly in set_bitmask.
Integrates pointer handling into set_bitmask, simplifying CCP.
This commit updates set_bitmask to handle pointers directly, eliminating special cases in the CCP (Constant Code Propagation) pass. Previously, CCP had specific logic for pointers that limited information to alignment. By processing pointers within set_bitmask, this information is handled more generally, simplifying the CCP implementation.
In Details
The ccp_finalize function in tree-ssa-ccp.cc is modified to no longer require special handling for pointers. This is because the set_bitmask function in tree-ssanames.cc has been updated to correctly process pointers. Prior to this, CCP had bespoke logic for pointers that primarily concerned alignment, which is now subsumed by the more general set_bitmask functionality. This aims to unify the handling of value properties within the SSA framework.
- CCP
- Constant Code Propagation. A compiler optimization pass that propagates constant values through the code.
- set_bitmask
- A function likely used in SSA form to set or update a bitmask representing properties of a value, such as its range or alignment.
- SSA
- Static Single Assignment form. An intermediate representation in compilers where every variable is assigned exactly once, simplifying many analyses and optimizations.
- alignment
- The requirement that data be stored at memory addresses that are multiples of a certain value, often related to hardware architecture.