This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to control GCC builtin functions optimization


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]