GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
gcc Performance Win

Improve dom_oracle::clear performance

Optimizes dom_oracle::clear by tracking relevant basic blocks.

The performance of dom_oracle::clear has been improved by introducing a managed list of basic blocks that contain relations involving SSA names. Instead of traversing the entire control flow graph, clear now iterates only through these tracked blocks, significantly reducing the overhead for clearing dominance information.

In Details

The dom_oracle::clear method in value-relation.cc is optimized by optimizing the traversal of basic blocks. It now uses an m_block_list to store only those BBs that have SSA-name relations, drastically cutting down the work during clearing operations compared to a full CFG walk. This change addresses PR tree-optimization/126856.

For Context
SSA name
Static Single Assignment form. In SSA, each variable is assigned a unique name the first time it is defined. This simplifies many compiler optimizations.
dominance
In control flow graphs, a basic block A dominates basic block B if every path from the entry node to B must go through A.
dom_oracle
A data structure or component within the compiler that manages and queries dominance information, often used in optimization passes.
basic block
A sequence of instructions with a single entry point and a single exit point, used as a fundamental unit in control flow analysis.
control flow graph (CFG)
A directed graph representing all execution paths in a program, where nodes are basic blocks and edges represent control flow transfers.
Filed Under: optimizationgccperformancecompiler