inlining memcpy

egada@gmx.net egada@gmx.net
Fri Nov 19 11:29:00 GMT 2010


Is there some way to force inlining of memcpy?

On my target (SPU), for a certain type T

T x[10], y;
memcpy (&y, x+3, sizeof(T));

is inlined, but

int a = rand() % 10;
memcpy(&y, x+a, sizeof(T));

is not. I've tried several optimization flags, do I overlook something
causing this behaviour? I would patch gcc to achieve inlining if
necessary.

Thank you
Thomas



More information about the Gcc-help mailing list