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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jan Hubicka from comment #2)
> > At -O3 the unused 'c' remains.  Likely different (recursive?) inlining 
> > makes us
> > process a cgraph cycle in different order and thus fail to elide the output
> > of 'c' (it's output first at -O3).
> > 
> > Fixing that would need processing cgraph SCCs with an extra IPA phase in 
> > main
> > optimization so we get a chance to do extra node removal (maybe order
> > the cycles so that functions we can elide - aka static ones - are processed
> > last).
> That would tamper with optimizations that propagate from callee to
> caller during late optimization, like IPA register allocation, stack
> alignment propagation or late pure/const discovery.

But inside a SCC the order is arbitrary anyway.  Note I'd only re-order SCCs
and keep the postordering the same otherwise.

> Honza

Reply via email to