This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug bootstrap/65150] [5 Regression] r220875 causes bootstrap failure on x86_64 darwin


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

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Iain Sandoe from comment #7)
> here we fall through to the case were we make a thunk - IFF we were not able
> to rmove the alias.  However, potentially, we already moved all the callers
> from the alias to the original.
> 
> (a) is that safe?

Why not?

> (b) we might as well avoid the work by testing whether the alias will be
> removable before we set redirect_callers?

Redirecting the callers is beneficial even when we create trunk.
For the redirected callers, they will jump directly to the right function,
while
without redirection you call a thunk, which in the better case just jumps to
the right function (ie. sibcall), in the worse case calls it and then returns.
So you save a few instructions on each redirected call.
When alias is created instead of redirection (in that case we don't redirect
callers right now), the only advantage of redirection would be tail recursion.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]