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: 81266 X-Patchwork-Delegate: kito.cheng@gmail.com Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4BFA23857C71 for ; Mon, 4 Dec 2023 09:55:47 +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-Google-Smtp-Source: AGHT+IGIXFvFU2yi2OYTxPd76QvVEUbVxWRh22nCsW1Sk+UBm9SJm1ywGjvP0JlHdHUADBlaNg/+vg== 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+patchwork=sourceware.org@gcc.gnu.org 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