From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1005) id 2D73B38A8144; Tue, 15 Nov 2022 17:27:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2D73B38A8144 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668533248; bh=qhf//1GcbuBFT/lXqng6NN/HoUOi7lzU8jWaZw7Ch38=; h=From:To:Subject:Date:From; b=dF1f/lzLgHp56CS+kf+g/EUcnt0MMQX0Ghqcr5ilO5TtRVURwcD8bGZcoCa3h+TI+ KT5HMRgx/I+dz5xEBhMjtv+G1Kz1JDF1k0AX+/KUiSb+Hb0hzhfe6cLjXTs+U4cLp/ 0oACyXEAAbAEA5H0zYwkW/+42vS4RkoNcY7LOsuQ= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Michael Meissner To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/meissner/heads/dmf004)] Add parameter for memcpy inline code moves X-Act-Checkin: gcc X-Git-Author: Michael Meissner X-Git-Refname: refs/users/meissner/heads/dmf004 X-Git-Oldrev: 8398557374d749782e51ecd4ecae776da82d209f X-Git-Newrev: e1efca6e71ebf7c6fed3eced75a2cd1cb62e3667 Message-Id: <20221115172728.2D73B38A8144@sourceware.org> Date: Tue, 15 Nov 2022 17:27:28 +0000 (GMT) List-Id: https://gcc.gnu.org/g:e1efca6e71ebf7c6fed3eced75a2cd1cb62e3667 commit e1efca6e71ebf7c6fed3eced75a2cd1cb62e3667 Author: Michael Meissner Date: Tue Nov 15 12:27:09 2022 -0500 Add parameter for memcpy inline code moves 2022-11-15 Michael Meissner gcc/ * config/rs6000/rs6000.opt (rs6000-memcpy-inline-bytes): New parameter, set to 0. * config/rs6000/rs6000-string.cc (expand_block_move): Only do optimization if rs6000-memcpy-inline-bytes is 16. Diff: --- gcc/config/rs6000/rs6000-string.cc | 1 + gcc/config/rs6000/rs6000.opt | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/gcc/config/rs6000/rs6000-string.cc b/gcc/config/rs6000/rs6000-string.cc index 2468e375781..1fa2d1fe553 100644 --- a/gcc/config/rs6000/rs6000-string.cc +++ b/gcc/config/rs6000/rs6000-string.cc @@ -2766,6 +2766,7 @@ expand_block_move (rtx operands[], bool might_overlap) if (! constp) { if (TARGET_BLOCK_OPS_UNALIGNED_VSX && TARGET_P9_VECTOR && TARGET_64BIT + && rs6000_memcpy_inline_bytes == 16 && !optimize_size) { rtx join_label = gen_label_rtx (); diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt index 6872d359952..90dc91a277f 100644 --- a/gcc/config/rs6000/rs6000.opt +++ b/gcc/config/rs6000/rs6000.opt @@ -687,3 +687,8 @@ default value is 4. Target Undocumented Joined UInteger Var(rs6000_vect_unroll_reduc_threshold) Init(1) Param When reduction factor computed for a loop exceeds the threshold specified by this parameter, prefer to unroll this loop. The default value is 1. + +-param=rs6000-memcpy-inline-bytes= +Target Undocumented Joined UInteger Var(rs6000_memcpy_inline_bytes) Init(0) Param +Maximum number of bytes to move with inline code before calling the memcpy +library function. The default value is 0.