From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from loongson-pc (unknown [114.242.206.180]) by sourceware.org (Postfix) with ESMTPS id AB9B53858C54 for ; Wed, 7 Jun 2023 07:50:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AB9B53858C54 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=163.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=loongson-pc Received: from loongson-pc (localhost [127.0.0.1]) by loongson-pc (8.15.2/8.15.2/Debian-14~deb10u2) with ESMTP id 3577oDxU003589; Wed, 7 Jun 2023 15:50:13 +0800 Received: (from chenxiaolong@localhost) by loongson-pc (8.15.2/8.15.2/Submit) id 3577oCIs003588; Wed, 7 Jun 2023 15:50:12 +0800 From: chen xiaolong To: gcc-patches@gcc.gnu.org Cc: xry111@xry111.site, i@xen0n.name, xuchenghua@loongson.cn, chenglulu@loongson.cn, chen xiaolong Subject: [PATCH v2] LoongArch:Change the default value of LARCH_CALL_RATIO to 6 on the LoongArch architecture. Date: Wed, 7 Jun 2023 15:49:09 +0800 Message-Id: <20230607074909.3541-1-chenxl04200420@163.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.7 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,MAY_BE_FORGED,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 List-Id: 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): Modify the value of macro LARCH_CALL_RATIO on LoongArch to make it perform optimally. --- 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 -- 2.38.0