[Bug tree-optimization/103117] uncprop produces harder to analyze but not better code

rguenther at suse dot de gcc-bugzilla@gcc.gnu.org
Mon Nov 8 09:54:21 GMT 2021


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

--- Comment #3 from rguenther at suse dot de <rguenther at suse dot de> ---
On Mon, 8 Nov 2021, hubicka at kam dot mff.cuni.cz wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103117
> 
> --- Comment #2 from hubicka at kam dot mff.cuni.cz ---
> > I suppose modref could (for pointer returns) use ranger to query its range
> > and see if it ever is non-NULL?  I'm not sure if we reliably propagate
> > null pointer constants everywhere.
> 
> I think we simply want to reorder the passes here...
> > 
> > Btw, uncprop is supposed to run right before RTL expansion - it is in fact
> > an out-of-SSA optimization, so even removing it as separate pass and
> > directly calling it from rewrite_out_of_ssa after eliminate_useless_phis
> > might be an improvement.
> 
> I don't know - this way we have separate dumps etc.  I think mistake was
> scheduling pure-const and later modref too late.

Maybe.  If you move them please put a comment before uncprop that it
should be last before RTL expansion.


More information about the Gcc-bugs mailing list