From patchwork Mon Dec 4 09:55:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christoph_M=C3=BCllner?= X-Patchwork-Id: 173183 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp2654496vqy; Mon, 4 Dec 2023 01:55:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IGQLDTIwjtaNhJpflO7N0ve0c0ViyXZ6x6Q8QKFezz0EKm28O6QiX7r0saaGVWSiX9wKiEb X-Received: by 2002:a05:622a:1495:b0:425:4043:7646 with SMTP id t21-20020a05622a149500b0042540437646mr7220639qtx.110.1701683754866; Mon, 04 Dec 2023 01:55:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701683754; cv=pass; d=google.com; s=arc-20160816; b=s7Bqyalc2QLFskyViAMe302noE57jNjl4YW5+QLrPZp0BM0bvZYBbYd9R4qcepZ2Ej 7ybTppsU1l2q5xz51PDhJFlAETyDomFhBUNSIi2YgMHXx7djTtZjX3hr0UCgtuM/Vq+F 7K7Hip7QGXk91kr61CPVhEpp/zEYWp1bP+7S/p2WDXeRUSdbaVv8yiM237yH0n8sr0QM ak+WesMJNZCEj0TfnF3OIjnKBaf7vnZPOJxjxcjENu2faaFHZJMmkEx1zcfvVQnFqZ6Z O+wN90YN/9wYds4NY3aCwggwXr7tU+5fcAHIVfuKioOiq3RE1CyL21Vj+weAwA6qKXtk seMA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=be8KbvvlwYQOrfZbQxZBSGgwzoS12jY3SKCRWMRFS/E=; fh=SOte8hLOvFJ3lpu7w3ocz2TE+sBbg8do/Qj4UBHSXP0=; b=XKdeBEhkC8GwrC6Qv6Wlc9/DoncHnD0wgOOTD+o974Hh0NA/FJexfjcy3OWR3xzsIF mKA4uHcIch4FpEkE1Sxvj00taBFByAn2Cwx5YumbdIvpd0lw7Yr4y3vSfM9U5sbo5SU0 QCA7is/0qcKtYXbOtnzyl5w1Rx4RMbUhov/4cguGt+lthluWVV7N2tF0fCNkzGqY7wNl k9b1K1DiOCTpAdFhgugDAOSMtjz0NcyIiuhKyKLQt1Rl3uuJ0PSJ59RYNCSNdorjmLhT qvFJO8LQftC6Mzm0wWpmpJ2rj3SJV1vtnr6ZLR9ZnaaBsLaT1kn0bHKBK/BcF2lAzrTb nFBQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vrull.eu header.s=google header.b=Onuv9K0P; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=vrull.eu Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id ex16-20020a05622a519000b00425450ffa54si4748555qtb.68.2023.12.04.01.55.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 01:55:54 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@vrull.eu header.s=google header.b=Onuv9K0P; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=vrull.eu Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A0D6C385AC2D for ; Mon, 4 Dec 2023 09:55:54 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by sourceware.org (Postfix) with ESMTPS id AC2C53857BAC for ; Mon, 4 Dec 2023 09:55:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AC2C53857BAC Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=vrull.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=vrull.eu ARC-Filter: OpenARC Filter v1.0.0 sourceware.org AC2C53857BAC Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::635 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701683709; cv=none; b=N5Gj6KzJ0xvgBhRya0iFnEOMDw7yryc1HVYx1IV8NSPYbRIORruUJ89827bDZC/zG5cc0Em2xRU9hePxQKTbKPZGQ/rMAB5WvmHE2JjZFISbSfTL9HUSdZprFHsDeyidUX/I50PNp8fRAibRmq1usTwBetdTQgEUDVkkNrRtQJc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701683709; c=relaxed/simple; bh=fuZCmHlLjG3azWcB9ixtUS0+7ASPOHefjtTx2Ven9zQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=bXnkJG36lQKlFir9emRfE1xzwQBBYhmrXrA+7oCLTQFdVWlSjKZRxL5N8tLixx4zaIdUdDxfqgWLUBtdWw3h2TWV1I7ThFByzFQauUbpkPoB6/hPUP0Mj3AtHl6QJ/oD9otQucIiUUBjEZJJUZQ7QK549dVxIMgv45NIBkd4hLc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a00c200782dso583174666b.1 for ; Mon, 04 Dec 2023 01:55:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull.eu; s=google; t=1701683706; x=1702288506; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=be8KbvvlwYQOrfZbQxZBSGgwzoS12jY3SKCRWMRFS/E=; b=Onuv9K0PnFo6/4Zpzrr0B/2RNj8uAHjdnE0wbiTvfulUrggRNuhf0bVuHyKd4G5BFM 1PFqP+khehw/s+zKWxXf1MsT98v8yvYHWn1eUxY3SrWOe//XiBd7qD29KeBlb8YfnwdF qDIGiC36vTYkmJfPy+h79lhX9xm5ymiIyVia0u1tzz1FcTiBx6uHk7+ig6E8q2Yz+E3f rVB95bGoydrQ+KNKuWTQEPPV+DrEjByLds7bCwANlF0emL9FzxjBT7tA0QVBGaVmMcuV 4ibk9yMDMoSw/5pIXfg5oDTBavwoKp77tyJTYS0U4fXTVEj78V7it62kuKSe9ygoIbxi 7e4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701683706; x=1702288506; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=be8KbvvlwYQOrfZbQxZBSGgwzoS12jY3SKCRWMRFS/E=; b=U0tgtijbEQpuG9Mf9IBD8wq4AwCrKWvK1XElyNm4Wht+5Tjzzq5JYcpBtpO0GgnhO7 jGUyhuUVe7JEBx157yZVXe+kVWDYEElY3wOUKDHtOYND5PxlxvnmQ8Q4ZBartO4e5//J BrKRGpnTPuBPlYRtd5nhAXXBHJDDAixbYeWfS4O+oJiym+H5B30q0x+j8D5qToF+P6y7 nZF53UIOChAOXdn+pPu5IJyr1X4jpsdTexmiYrFym6G/OBUQTurdhyAMYQm11e33OBN5 Ek/jK5DflGjXK4qacn1FFspNj/FNE1G8nNUgtnw60+LqKiO5UiXE7pba3P3DCPV5muSz Dq9g== X-Gm-Message-State: AOJu0YwhwGksrEHYSQsKfymAu9tq1e+qP3I7Uv7oI1pObxhDx3LFOqnm VwMmV1Gl7EUQjBRhHAo6+Le55+W9ZYqF5FOz3fCrXA== X-Received: by 2002:a17:906:73da:b0:a1a:5836:4677 with SMTP id n26-20020a17090673da00b00a1a58364677mr1028914ejl.165.1701683705826; Mon, 04 Dec 2023 01:55:05 -0800 (PST) Received: from beast.fritz.box (62-178-148-172.cable.dynamic.surfer.at. [62.178.148.172]) by smtp.gmail.com with ESMTPSA id k11-20020a170906128b00b009ff8f199f21sm5202354ejb.19.2023.12.04.01.55.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 01:55:05 -0800 (PST) From: =?utf-8?q?Christoph_M=C3=BCllner?= To: gcc-patches@gcc.gnu.org, Kito Cheng , Jim Wilson , Palmer Dabbelt , Andrew Waterman , Philipp Tomsich , Jeff Law , Jeremy Bennett Cc: =?utf-8?q?Christoph_M=C3=BCllner?= Subject: [PATCH v2] RISC-V: Document optimization parameter riscv-strcmp-inline-limit Date: Mon, 4 Dec 2023 10:55:00 +0100 Message-ID: <20231204095500.1569673-1-christoph.muellner@vrull.eu> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_MANYTO, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784344744981358900 X-GMAIL-MSGID: 1784344744981358900 This patch documents the optimization parameter riscv-strcmp-inline-limit, which can be used to tweak the behaviour of -minline-strcmp and -minline-strncmp. gcc/ChangeLog: PR target/112650 * doc/invoke.texi: Document riscv-strcmp-inline-limit. Signed-off-by: Christoph Müllner --- gcc/doc/invoke.texi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 6fe63b5f999..2b51ff304f6 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -29846,6 +29846,10 @@ Inlining will only be done if the strings are properly aligned and instructions for accelerated processing are available. The default is to not inline strcmp calls. +The @option{--param riscv-strcmp-inline-limit=@var{n}} parameter controls +the maximum number of bytes compared by the inlined code. +The default value is 64. + @opindex minline-strncmp @item -minline-strncmp @itemx -mno-inline-strncmp @@ -29854,6 +29858,10 @@ Inlining will only be done if the strings are properly aligned and instructions for accelerated processing are available. The default is to not inline strncmp calls. +The @option{--param riscv-strcmp-inline-limit=@var{n}} parameter controls +the maximum number of bytes compared by the inlined code. +The default value is 64. + @opindex mshorten-memrefs @item -mshorten-memrefs @itemx -mno-shorten-memrefs