ipa-cp: Fix devirt bonus for targets that cannot be inlined
PR 123412 has been filed because since commit
r16-3990-gad3fb999a1b568 (Jan Hubicka: Improve ipa-cp devirtualization
costing), there is accidentally zero devirtualization bonus for
functions which cannot be inlined. This has resulted in
g++.dg/ipa/devirt-2.C failing since it has been pushed because the
required function is not cloned even with --param max-devirt-targets=1.
The intention was that we do get at least some small benefit boost and
so this patch adds an addition of the indirect edge frequency once
before the early continue statements.
gcc/ChangeLog:
2026-01-14 Martin Jambor <mjambor@suse.cz>
PR ipa/123412
* ipa-cp.cc (devirtualization_time_bonus): Do add the indirect
edge frequency at least once even for targets which cannot be
inlined.
1 file changed