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

--- Comment #9 from Jan Hubicka <hubicka at ucw dot cz> ---
> I agree that multi-target might be sth for -O3, though with profiling we
> generally enable -O3-ish things also for -O2.
With profiling the multi-target devirt has data on what functions was
actually called, so we do not hit this particular problem of introducing
a code path to CFG that is never taken during execution.  We however hit
other similar false positives because we do more code duplication and
may warn about other code paths not taken in real world.  (it is why
profiledbootstrap has tendency to fail without -Wno-error).

Speculative devirtualization has relatively strict cost model enabling
it only when inlining or some interesting propagation happened.  In
general I think -O2 optimizations should not be disabled/enabled based
on false positives in -Wall and I would rather preffer such warnings to
not be part of -Wall or not fail the build with -Werror...

Ideally optimization should be enabled/disabled based on code
quality/code size (or compile time) trandeoffs.  On SPEC speculative
devirt triggers only in leela and the benefits are quasetionable, so I
suppose making it -O3 only is OK.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to