GCC Newspaper
JUNE 15, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
i386 Performance Win

i386: Reduce build time by improving division modeling.

Reduces GCC build time by optimizing the modeling of division operations in the i386 backend.

GCC build time significantly increased due to excessive execution time of genautomata, caused by combinatorial explosion in division modeling in c86-4g*.md. This patch mitigates the issue by introducing dedicated automatons and cpu_units for idiv and fdiv, updating the integer, floating-point division, and square root modeling.

In Details

Commit r17-203 caused a significant increase in GCC build time due to the division modeling in c86-4g*.md leading to a combinatorial explosion in the automaton. This patch addresses the issue by introducing dedicated automatons and cpu_units for idiv and fdiv, updating the integer, floating point division and square root modeling. The patch aims to reduce the complexity of the generated automata, decreasing build times. Affected files include c86-4g*.md.

For Context

When compiling code for Intel x86 processors, the compiler uses instruction scheduling to optimize performance. This involves modeling the processor's internal execution units and the latencies of different instructions. This commit optimizes the way the compiler models division operations, which were causing a significant slowdown during the compiler's build process. By improving the modeling, the compiler can generate more efficient code without increasing its own build time.

Filed Under: i386build timeoptimizationinstruction scheduling