This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to control GCC builtin functions optimization
- From: Martin Liška <mliska at suse dot cz>
- To: Cao jin <caoj dot fnst at cn dot fujitsu dot com>, gcc-help at gcc dot gnu dot org
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 11 Jan 2019 10:22:10 +0100
- Subject: Re: How to control GCC builtin functions optimization
- References: <38b466d6-f905-0fb8-e9aa-04c7aac5e3d3@cn.fujitsu.com>
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