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

IPA analysis handles internal .ASSUME calls with callback edges

Introduces internal callback edges for .ASSUME calls to trigger jump function computations.

This commit enhances the Inter-Procedural Analysis (IPA) by creating an internal callback edge when an .ASSUME internal call is encountered. This edge acts as a trigger for subsequent optimizations by ensuring that jump functions are computed for it, even though the jump functions would have typically been finalized by that point in the analysis. The patch also includes new test cases to verify this functionality.

In Details

In the IPA framework, specifically within ipa-prop.cc, this patch modifies ipa_analyze_call_uses. When an IFN_ASSUME internal call is detected, a new internal callback edge is created. Crucially, ipa_compute_jump_functions_for_edge must be called separately for this newly created edge because the jump function computation for all other edges would have already completed. This ensures that the analysis correctly accounts for the control flow introduced by .ASSUME calls.

For Context
IPA
Inter-Procedural Analysis. GCC performs analysis and optimizations by looking at the entire program (all procedures) at once, rather than analyzing each procedure in isolation.
Inter-Procedural Scalar Replacement (IPA-SRA)
An optimization pass within GCC's IPA framework that attempts to replace scalar memory references (like array elements or struct fields) with register variables, potentially improving performance.
callback edge
An edge in the call graph that represents a function being called indirectly, often through a function pointer or a more complex mechanism. Internal callback edges are specific to GCC's internal representation.
jump functions
Mathematical functions used in SSA form to represent the values of variables that depend on control flow. They help track how values propagate through conditional branches.
.ASSUME call
An internal GCC construct representing an assumption about program behavior, often used for optimization purposes. These do not typically appear in the final compiled code.
Filed Under: ipaoptimizationcontrol-flow