This is the mail archive of the
mailing list for the GCC project.
Re: Expansion of memset and memcpy calls.
- From: Kyrill Tkachov <kyrylo dot tkachov at arm dot com>
- To: Ajit Kumar Agarwal <ajit dot kumar dot agarwal at xilinx dot com>, Vladimir Makarov <vmakarov at redhat dot com>, gcc Mailing List <gcc at gcc dot gnu dot org>
- Cc: Vinod Kathail <vinodk at xilinx dot com>, Shail Aditya Gupta <shailadi at xilinx dot com>, Vidhumouli Hunsigida <vidhum at xilinx dot com>, Nagaraju Mekala <nmekala at xilinx dot com>
- Date: Tue, 21 Oct 2014 10:13:06 +0100
- Subject: Re: Expansion of memset and memcpy calls.
- Authentication-results: sourceware.org; auth=none
- References: <c54c65b2ead74fdaaf897835c6a9d375 at BN1AFFO11FD037 dot protection dot gbl>
On 21/10/14 08:37, Ajit Kumar Agarwal wrote:
Memset and Memcpy calls are extensively used in many benchmarks. Inlining or expansion
the memcpy and memset calls improves the performance of many performance
I have implemented the expansion of strcmp to the optimizaed sequence of instruction
In open64 compiler for AMD x86 target.
Can I suggest and propose to expand the memset and memcpy calls to the sequence
Of instruction as many targets like ARM are moving implementation of memcpy and
Memset in assembly instead of C. This makes it easier to expand the memcpy and
Memset call in gcc.
There is the 'movmem' standard name that backends can expand to
implement memcpy semantics. For aarch64, for example, look at the
movmemdi pattern in aarch64.md and the aarch64_expand_movmem helper in
To implement this in GCC we need to expand similarly to the implementation as builtins.
Let me know what do you think.
Thanks & Regards