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: 104317 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp81724vqr; Wed, 7 Jun 2023 00:51:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ62dO8PA5cXLrbjXrTZFnJRSJ2OzmaVkBIwwm6y8ae84eCgXYzwi/uXxZXQvwXJI4WRtRJG X-Received: by 2002:a17:907:1c15:b0:96f:f807:6af5 with SMTP id nc21-20020a1709071c1500b0096ff8076af5mr4521445ejc.39.1686124272590; Wed, 07 Jun 2023 00:51:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686124272; cv=none; d=google.com; s=arc-20160816; b=wEBkmpaBAlNlNVKOtuGOn3EUHo0ktYLZgscoCLzpbN4plt+WUGd67RlKPZp0AROSvO TIi1lxfN3ZIiPxWC9AAVJsjAwa9Kw9Zzw0hEKBgwTLTnPRZoCUgokMsbSwvEQzBcp29Q hJMjWl7KMGR1klkY8hnHo7U9wDGF5oWSuqaAIcaorxDBYPEZC36a2zcBTo2vVZav8Bzd iMzNQlNyFW6bZMVuBwTjVwx389t944eTMqbKkMnHalyKeBsQ1dzi5Ri1eLeGYYiQwwEt H82wO3jGsnFipRUMs2JaUESXR7LdR2aRTDr++3ZLduWKncJCEt6Vb7D8BNroSzpaOc/a OHWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=7PJtIVdTRLZ4HKLX61LBNTHrxQKs8ogkiTTHHq5B02Q=; b=l9whqUJY8S3VFdOlqtP5lJGF7/KASLeeKbu4C0XWHq7WK38SNp5Mz8nHRt+nA9task FE6vR/h/ksjjnYcWYdMDeCpvKlV9JQzR3IavMKDZJ2A1S8OPl33PvGHmY2b4O2qRdPTh J2k5yXQm0qcvV5TkPPJcIJa5Wnj/ct4n8zHGUTU7KKd8IcyflYliRhX6NDbRGtBnkOTz 9vVxzLRMprsCyrXN0lmbReh2sZ5i8tEXzSm36/yy/QFb4VVo28jGvD3mDweVnC7byuX2 R59zHRfwSWoibqVVTw8TOVldouZ2q7eLfVTTNqjxkyQRG4UAWXD7fAq7Y0JS3e1HIqGh Sv+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=xIYshPa9; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id ho40-20020a1709070ea800b009602b84b75dsi8895937ejc.952.2023.06.07.00.51.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jun 2023 00:51:12 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=xIYshPa9; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 41B6F3858023 for ; Wed, 7 Jun 2023 07:51:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 41B6F3858023 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686124271; bh=7PJtIVdTRLZ4HKLX61LBNTHrxQKs8ogkiTTHHq5B02Q=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=xIYshPa9zY8N1OkXLHQdmdNHIqCo7qO43+3X5GGPF3lAzx9SYHHGiV8R4mSBvj/bq OXLhWGAXS0RC/kSnr7ufP650bPLt3aG4DTYVvjs/xEtWrPwLdbU4VDkvyRN4ph7I4I 6bzdMlGqGkVIxTC+A6sbu2xfoCjf2q1L+TCDAGBQ= 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+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768015276775015192?= X-GMAIL-MSGID: =?utf-8?q?1768029445012258276?= 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