From patchwork Wed Jun 7 07:49: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: 70706 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 813353858296 for ; Wed, 7 Jun 2023 07:50:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 813353858296 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686124255; bh=7PJtIVdTRLZ4HKLX61LBNTHrxQKs8ogkiTTHHq5B02Q=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=y2FuhiobWbjoDqdusY1MitbjONQMtFzBP4UqgvcLx0OxT7Eewm+49c+/kiByWix3L NiY94lFLAFfCKadZztwAuRSK96uk+GOCZmbsodsj8vnpCXkscZRLorXbCGp7GyicMs gX9fO13uERLqw5Crbb/MKKJtyfQ4PcMUlmZMatCk= 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 AB9B53858C54 for ; Wed, 7 Jun 2023 07:50:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AB9B53858C54 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 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 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 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): 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