From patchwork Wed Jun 7 04:04:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chen xiaolong X-Patchwork-Id: 70696 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 BBD6A3858421 for ; Wed, 7 Jun 2023 04:05:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BBD6A3858421 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686110744; bh=VB/F8qyBfW8JMlyVvkUL7uDOabEjso+bjoeApepemhM=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=Jxplu7Lb4x9ELTwnjyu6CjY78hcIkbO/w7Ao4wuGUiVRQC54pds/XCpWmXCOwdKX1 tVbFpIc9ADGikfS7HADYDNikAmy8S9PswFomVzHtzHUG0dKCPCyHCO+4q15nkEXaVS gHYqYxgnqBSVdYGxR5WvjRwJkGYZtxqSozKBRjEQ= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from loongson-pc (unknown [114.242.206.180]) by sourceware.org (Postfix) with ESMTPS id 9A5A43858C54 for ; Wed, 7 Jun 2023 04:05:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9A5A43858C54 Received: from loongson-pc (localhost [127.0.0.1]) by loongson-pc (8.15.2/8.15.2/Debian-14~deb10u2) with ESMTP id 35745Cbg002458; Wed, 7 Jun 2023 12:05:12 +0800 Received: (from chenxiaolong@localhost) by loongson-pc (8.15.2/8.15.2/Submit) id 35745BtI002456; Wed, 7 Jun 2023 12:05:11 +0800 To: gcc-patches@gcc.gnu.org Cc: xry111@xry111.site, i@xen0n.name, xuchenghua@loongson.cn, chenglulu@loongson.cn, chen xiaolong Subject: [PATCH v1] LoongArch:Change the default value of LARCH_CALL_RATIO to 6 on the LoongArch architecture. Date: Wed, 7 Jun 2023 12:04:09 +0800 Message-Id: <20230607040409.2409-1-chenxl04200420@163.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, FSL_HELO_NON_FQDN_1, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, HELO_NO_DOMAIN, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, KHOP_HELO_FCRDNS, SPF_NONE, SPOOFED_FREEMAIL, 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: chen xiaolong via Gcc-patches From: chen xiaolong Reply-To: chen xiaolong Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" During the regression testing of the LoongArch architecture GCC, it was found that the tests in the pr90883.C file failed. The problem was modulated and found that the error was caused by setting the macro LARCH_CALL_RATIO to a too large value. Combined with the actual LoongArch architecture, the different thresholds for meeting the test conditions were tested using the engineering method (SPEC CPU 2006), and the results showed that its optimal threshold should be set to 6. gcc/ChangeLog: * config/loongarch/loongarch.h (LARCH_CALL_RATIO): --- gcc/config/loongarch/loongarch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/loongarch/loongarch.h b/gcc/config/loongarch/loongarch.h index f8167875646..adea7333925 100644 --- a/gcc/config/loongarch/loongarch.h +++ b/gcc/config/loongarch/loongarch.h @@ -1055,7 +1055,7 @@ typedef struct { /* The base cost of a memcpy call, for MOVE_RATIO and friends. These values were determined experimentally by benchmarking with CSiBE. */ -#define LARCH_CALL_RATIO 8 +#define LARCH_CALL_RATIO 6 /* Any loop-based implementation of cpymemsi will have at least LARCH_MAX_MOVE_BYTES_STRAIGHT / UNITS_PER_WORD memory-to-memory