This is the mail archive of the
mailing list for the GCC project.
Re: How to control GCC builtin functions optimization
On 1/11/19 5:22 PM, Martin Liška wrote:
> 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?
> Please take a look here:
Yes, I already have it and spent some time on it. It just a little bit
difficult for GCC newbie to find the answer accurately(I searched some
of the used flags).
> you are searching for:
> 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
I tried -mmemcpy, it seems these two are not for x86.
> and possibly for:
And yes, -mmemcpy-strategy worked as I expected.
Thanks very much!