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

--- Comment #15 from rguenther at suse dot de <rguenther at suse dot de> ---
On Tue, 14 Mar 2023, jakub at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109087
> 
> --- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> I didn't mean for GCC 13, we need to fix the actual backend bug regardless and
> so a DSE improvement can't be considered a fix... ;)
> Just the DSE thing happens very often with -ftrivial-auto-var-init=.
> I wonder if even after your improvement we don't keep .DEFERRED_INIT for 
> unused
> vars for the case when the DSE walk will run into the vdef/vuse limits (I
> assume it doesn't do unbounded walk).

Sure, it's still covered by the walking limit.

> Perhaps some special handling of
> .DEFERRED_INITs for vars which have solely those statements and clobbers and
> nothing else?

remove_unused_locals has code to handle vars only CLOBBEREd, so yes,
we can probably wire such a thing in there at the cost of one extra
walk (see the have_local_clobbers flag, the first walk discovers,
the second eventually removes them).

I'll see to draft a patch for this as well.

Reply via email to