GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
dom

DOM: Replace simplify_binary_operation with ranger

DOM analysis now relies on the ranger pass for simplifying binary operations, removing redundant code.

The DOM (Dominator Tree) analysis pass has removed its simplify_binary_operation method. This functionality is now handled more effectively by the ranger pass, which specializes in value range analysis. The change streamlines the DOM pass by offloading this task. New test cases were added to ensure that the compiler’s ability to handle these operations is preserved. Testing on a benchmark suite showed no regressions.

In Details

The dom_opt_dom_walker::simplify_binary_operation method in tree-ssa-dom.cc was used to simplify binary operations within the DOM pass. This commit removes that method and its callers, redirecting this responsibility to the ranger pass. The ranger pass is better suited for deriving simplifications based on value ranges. Functionality tests were added to verify that cases previously handled by simplify_binary_operation are now correctly managed by the ranger, ensuring no loss of optimization capability.

For Context
DOM
Dominator Tree. A control flow graph (CFG) tree structure where each node dominates all nodes in its subtree. It's used for various optimizations.
ranger pass
A compiler optimization pass that determines the range of possible values for variables and expressions.
simplify_binary_operation
A function or method that simplifies expressions involving binary operators (e.g., addition, subtraction) based on known properties of the operands.
lookup miss
A situation where a requested item is not found in a cache or lookup table.
SSA form
Static Single Assignment form. An intermediate representation where every variable is assigned exactly once, simplifying many optimizations.
Filed Under: domoptimizationranger