How to control GCC builtin functions optimization

Martin Liška mliska@suse.cz
Fri Jan 11 09:22:00 GMT 2019


On 1/11/19 4:03 AM, Cao jin wrote:
> Now the questions is: from code-reading, it is kind of non-intuitive, is
> there any explicit way to control the optimization behavior accurately?

Hi.

Please take a look here:
https://gcc.gnu.org/onlinedocs/gcc.pdf

you are searching for:
-mmemcpy
-mno-memcpy
Force (do not force) the use of memcpy for non-trivial block moves. The default
is ‘-mno-memcpy’, which allows GCC to inline most constant-sized copies

and possibly for:
-mmemcpy-strategy

and
-mstringop-strategy=alg

Martin



More information about the Gcc-help mailing list