https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122058

--- Comment #35 from Richard Biener <rguenth at gcc dot gnu.org> ---
So from the OK/BAD dumps we see

 Dropping polymorphic call info; it cannot be used by ipa-prop
-***dbgcnt: upper limit 1215 reached for devirt.***
 optimized: speculatively devirtualizing call in semanticallyEquivalent/17160
to getModifier/15146
 Indirect call -> speculative call semanticallyEquivalent/17160 =>
getModifier/15146
+***dbgcnt: upper limit 1216 reached for devirt.***
+optimized: speculatively devirtualizing call in semanticallyEquivalent/17160
to
_ZThn8_NK3icu6number4impl15LongNameHandler11getModifierENS1_6SignumENS_14StandardPlural4FormE/16532
+Indirect call -> speculative call semanticallyEquivalent/17160 =>
_ZThn8_NK3icu6number4impl15LongNameHandler11getModifierENS1_6SignumENS_14StandardPlural4FormE.localalias/34815
+optimized: devirtualized call in semanticallyEquivalent/17160 to 2 targets
   Targets of polymorphic call of type 1313:struct Modifier token 8
     Outer type (dynamic):struct Modifier (or a derived type) offset 0
     This is partial list; extra targets may be defined in other units.
(derived types included)

the way dbg_cnt is placed it does not guard optimization on a specific call
but it guards the selected likely targets, meaning we're probably seeing
which of the speculatively direct calls are then miscompiled by followup
transforms?  Unless the function pointer comparison gets wrong which
may or may not happen given the .localalias clone we speculatively redirect
to?  At least the above does not suggest that we only had one candidate.

Reply via email to