https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10837
Petr Skocik <pskocik at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pskocik at gmail dot com
--- Comment #19 from Petr Skocik <pskocik at gmail dot com> ---
IMO(In reply to Xi Ruoyao from comment #16)
> In practice most _Noreturn functions are abort, exit, ..., i.e. they are
> only executed one time so optimizing against a cold path does not help much.
> I don't think it's a good idea to encourage people to construct some fancy
> code by a recursive _Noreturn function (why not just use a loop?!) And if
> you must write such fancy code anyway IMO musttail attribute (PR83324) will
> be a better solution.
There's also longjmp, which may not be all that super cold and may be executed
multiple times. And while yeah, nobody will notice a single call vs jmp time
save against a process spawn/exit, for a longjmp wrapper, it'll make it a few %
faster (as would utilizing _Noreturn attributes for better register allocation:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114097, which would also save a
bit of codesize too). Taillcalls can also save a bit of codesize if the target
is near.