[PATCH] Prefer mempcpy to memcpy on x86_64 target (PR middle-end/81657).
Martin Liška
mliska@suse.cz
Wed Mar 28 14:29:00 GMT 2018
On 03/21/2018 11:34 AM, Jakub Jelinek wrote:
> On Wed, Mar 14, 2018 at 02:54:00PM +0100, Martin Liška wrote:
>>> The variable is not named very well, shouldn't it be avoid_libcall or
>>> something similar? Perhaps the variable should have a comment describing
>>> what it is. Do you need separate argument for that bool and
>>> is_move_done, rather than just the flag being that some pointer to bool is
>>> non-NULL?
>>
>> Can you please explain me how to replace the 2 new arguments?
>
> So you have one bool arg and one pointer arg into which the function
> stores true and optionally based on that other bool arg and other conditions
> stores false.
> I'm suggesting just one bool * argument, which is NULL if the bool arg would
> be false, and non-NULL otherwise. The single argument still could be
> called bool *avoid_libcall, and you'd just
> if (avoid_libcall) { *avoid_libcall = true; return retval; }
> instead of emitting a libcall, the caller would initialize the bool
> variable to false.
>
> Jakub
>
Got it. I'm sending updated version of the patch. Hope I've had enough fantasy to
write it nice.
Tested on both ppc64le and x86_64.
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Introduce-new-libc_func_speed-target-hook-PR-middle-.patch
Type: text/x-patch
Size: 10750 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180328/832aa2ce/attachment.bin>
More information about the Gcc-patches
mailing list