Re: [PATCH v2 4/4] __arch_xprod64(): make __always_inline when optimizing for performance
From: Nicolas Pitre
Date: Sun Jul 07 2024 - 15:14:34 EST
On Sun, 7 Jul 2024, Arnd Bergmann wrote:
> On Sun, Jul 7, 2024, at 19:17, Nicolas Pitre wrote:
> > From: Nicolas Pitre <npitre@xxxxxxxxxxxx>
> >
> > Recent gcc versions started not systematically inline __arch_xprod64()
> > and that has performance implications. Give the compiler the freedom to
> > decide only when optimizing for size.
> >
> > Signed-off-by: Nicolas Pitre <npitre@xxxxxxxxxxxx>
>
> Seems reasonable. Just to make sure: do you know if the non-inline
> version of xprod_64 ends up producing a more effecient division
> result than the __do_div64() code path on arch/arm?
__arch_xprod_64() is part of the __do_div64() code path. So I'm not sure
of your question.
Obviously, having __arch_xprod_64() inlined is faster but it increases
binary size.
Nicolas