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

ipa-cp: Pass widest_int parameters by const reference

Optimizes widest_int parameter passing in ipa-cp functions for performance.

The ipa-cp pass in GCC now passes widest_int parameters by const reference to set_to_constant, meet_with, and meet_with_1 functions. widest_int is a large inline-buffer type, and these functions only read its values. This change avoids unnecessary copying of this large type, leading to a potential performance improvement without altering functionality.

In Details

This commit modifies the ipcp_bits_lattice methods within GCC's interprocedural analysis (IPA) copy propagation pass (ipa-cp). The widest_int type, used for large inline buffers, is now passed by const reference instead of by value. This is a micro-optimization to avoid copying large data structures when only read access is needed, impacting performance within the IPA framework.

Filed Under: optimizationgcc