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

--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
IMHO REG_UNUSED notes should stay correct or be removed.  Instead of a full
solution can we just wipe them in postreload-cse as we know that pass will
break them?  Any user then should recompute the notes.  Originally pass
properties were thought of a vehicle indicating these kind of IL features, so
we
could add PROP_rtl_unused_notes and if not set treat them as possibly
invalid when present (instead of actively wiping them), and when a pass
requires them re-compute them.

The problem with properties is that they are always set/unset irrespective
of whether a pass did something destroying it.  That could be
circumvented by postreload-cse only clearing the flag when it does
something.

Not (re-)using pass properties for this but a flag in struct function
works as well of course (or treat it as part of the DF state).

Reply via email to