https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125334
--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Jason Merrill <[email protected]>: https://gcc.gnu.org/g:bb26018080699913959526c89ce2e618c97768ec commit r17-1791-gbb26018080699913959526c89ce2e618c97768ec Author: Jason Merrill <[email protected]> Date: Tue Jun 23 17:28:36 2026 -0400 c++/modules: dependent ADL laziness [PR125334] I was digging into modules for another bug and remembered an earlier thought that a possible further improvement for this PR would be to just mark the ADL functions as reachable, not actual dependencies of the current entity. This turns out to be as simple as removing the call to add_dependency; the test still passes, but now the ADL functions are loaded lazily because they have their own dependency groups instead of being tightly coupled to the call site. This provides a speed-up of about 24% on the performance test in this PR with my debugging build of trunk. PR c++/125334 gcc/cp/ChangeLog: * module.cc (depset::hash::find_dependencies): Don't add_dependency dependent ADL functions. gcc/testsuite/ChangeLog: * g++.dg/modules/adl-12_b.C: Check for lazy loading.
