Re: [PATCH] X86-32: Let gcc decide whether to inline memcpy was Re:New x86 warning

From: Linus Torvalds
Date: Wed Apr 22 2009 - 17:04:26 EST




On Wed, 22 Apr 2009, Andi Kleen wrote:
>
> Modern gcc (and that is all that is supported now) should be able to
> generate this code on its own already. So if you call __builtin_* it
> will just work (that is what 64bit does) without that explicit code.

Last time we tried that, it wasn't true. Gcc wouldn't inline even trivial
cases of constant sizes.

I do not recall what gcc version that was all about, and maybe the
versions we now require are all modern enough that it isn't an issue, but
I'd want somebody to actually _verify_ that the oldest version we support
does an ok job, and doesn't do stupid things for constant-sized memcpy's.

> IMHO it's long overdue to do this for 32bit too.

With actual testing, I'll happily merge this.

Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/