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

--- Comment #25 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Martin Jambor from comment #24)
> (In reply to Martin Jambor from comment #21)
> > [...]
> > First, it uses externally_visible flag before it is actually computed.
> > 
> 
> I have looked at this together with Honza and the invocation where
> this is happening is actually not relevant for this case (and likely
> is harmless in general).  The DECL_DECLARED_INLINE_P test is what
> matters.

So, IIUC, it is perfectly reasonable to make these optimisations if (a) we
completely inline the callee or (b) we clone the callee.

If the only case in which we need to back out of (or disable) the optimisation
is when we determine that we are not going to take either of those actions, but
the callee is DECL_DECLARED_INLINE_P - then how often would we be losing a
"useful (albeit potentially invalid) optimisation" ?

Reply via email to