Message ID | 20221029070524.2570782-1-chenglulu@loongson.cn |
---|---|
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1223985wru; Sat, 29 Oct 2022 00:11:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7jpcEaw3peSIHMxuqTEiJqbLjYQ6uTl06TIk+WgUr2DEcP3g/p5y7KlvhG/2aL8jOpeHpo X-Received: by 2002:aa7:df94:0:b0:461:aff8:d3e1 with SMTP id b20-20020aa7df94000000b00461aff8d3e1mr3188526edy.10.1667027477043; Sat, 29 Oct 2022 00:11:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667027477; cv=none; d=google.com; s=arc-20160816; b=wix6cdl/iSitX54CSMcC/sjw2keTBbxgH6rQNphJLFxlF5A1olDFwH3Dmkk9xctNvs Co4v5/F71vG0ztbWCVmVd/AHYm+D0MDGdy9Ic0qfmaATwdL9Id1PQ3F+9AjpAc4j3xyS oTAMdM/K/aFCGBIPq8XKULa+X4T4TTf76awy09gwB2m04pmB75+o8fCnCtbwdzViYsX/ 7MT5wNnKzKcN48uOnjdYyuGdLFGoQsKMQEyr0AhfTRyP0dUV46smGLBaVCBkBcOOTq2o NycxDwfRHQHgDglSEQr/+oVyzq7UKi62iEwS0soA2zjVbTxNTJ7wMI74AZm6s/pK6tOt qW5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dmarc-filter :delivered-to; bh=A+U1xi/eK66grEEDQJ0wgVBBVPNi+I/skxbPuHbATKo=; b=cCogbGR/NfIxLscr7HrWcGZYuXcyZFAliHb9bRuEY9nMi9UHktPXBAb9YzQ5fyiOZ1 2T6F9JBpHqnLtantI8lT0KJQGttcI6K5lMdsjiKm9hY59ZhnkPylZlgKGmdAltApxd2z K5W0DRySPyZ77VPu1lPocQ6XXs0poCn9MU5my2kPOccQ4vXDmlrOfZxBmURQEU1ehku+ OdwU6mnN9qMsSUaEFVpvmpWfuQj/YBwvSvLnBilUcrhYlte7t6rrVxbcqyQ33nQmQC4A PmknE64GBZzkaWAUzCKyvNWJKfN3Enj+qkJMNwuLFMfJ3xAlV+gqs+ubsJG+MFrpofAS lANQ== ARC-Authentication-Results: i=1; mx.google.com; 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" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id v15-20020a056402348f00b0045c29d74fcesi1121736edc.568.2022.10.29.00.11.16 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Oct 2022 00:11:17 -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; 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" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4A9E1385742D for <ouuuleilei@gmail.com>; Sat, 29 Oct 2022 07:10:58 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by sourceware.org (Postfix) with ESMTP id 77CDE3858401 for <gcc-patches@gcc.gnu.org>; Sat, 29 Oct 2022 07:10:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 77CDE3858401 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=loongson.cn Received: from loongson.cn (unknown [10.2.5.5]) by gateway (Coremail) with SMTP id _____8BxGdjj0VxjajwDAA--.10397S3; Sat, 29 Oct 2022 15:10:28 +0800 (CST) Received: from 5.5.5 (unknown [10.2.5.5]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Dx9Vbd0VxjWT0HAA--.5956S2; Sat, 29 Oct 2022 15:10:25 +0800 (CST) From: Lulu Cheng <chenglulu@loongson.cn> To: gcc-patches@gcc.gnu.org Subject: [PATCH v1 0/2] Optimize immediate load. Add prefetch insns. Date: Sat, 29 Oct 2022 15:05:23 +0800 Message-Id: <20221029070524.2570782-1-chenglulu@loongson.cn> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8Dx9Vbd0VxjWT0HAA--.5956S2 X-CM-SenderInfo: xfkh0wpoxo3qxorr0wxvrqhubq/ X-Coremail-Antispam: 1Uk129KBjvdXoWrZry7ZF17Ar1UZFyUtw18Krg_yoWDCrX_X3 W3ta4Dur4UJa95Ja4jqFWFy34UXa1ktF9IkFyqqr4IkF15Xry3Ar4jg3W3ZF1S9r98XFZx JFZ7KryYyrnFqjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8wcxFpf9Il3svdxBIdaVrn0 xqx4xG64xvF2IEw4CE5I8CrVC2j2Jv73VFW2AGmfu7bjvjm3AaLaJ3UjIYCTnIWjp_UUUY 17kC6x804xWl14x267AKxVWUJVW8JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3w AFIxvE14AKwVWUGVWUXwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK 6xIIjxv20xvE14v26ryj6F1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4j6F4UM28EF7 xvwVC2z280aVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gr1j6F4UJwAS 0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07AIYIkI8VC2zVCFFI0UMc02F40EFcxC0V AKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1l Ox8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JMxAIw28IcxkI7VAKI48JMxC20s 026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_ JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14 v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwCI42IY6xAIw20EY4v20xva j40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVWUJV W8JbIYCTnIWIevJa73UjIFyTuYvjxU25EfUUUUU X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_SHORT, RCVD_IN_SBL_CSS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Cc: xuchenghua@loongson.cn, Lulu Cheng <chenglulu@loongson.cn>, i@xen0n.name Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748005003944393970?= X-GMAIL-MSGID: =?utf-8?q?1748005003944393970?= |
Series |
Optimize immediate load. Add prefetch insns.
|
|
Message
chenglulu
Oct. 29, 2022, 7:05 a.m. UTC
1. The problem mentioned in the link does not move the four immediate load instructions out of the loop. It has been optimized. Now, as in the test case, four immediate load instructions are generated outside the loop. (https://sourceware.org/pipermail/libc-alpha/2022-September/142202.html) 2. Add prefetch insns. *** BLURB HERE *** Lulu Cheng (2): LoongArch: Optimize immediate load. LoongArch: Add prefetch insns. gcc/config/loongarch/constraints.md | 7 +- gcc/config/loongarch/loongarch-def.c | 2 + gcc/config/loongarch/loongarch-protos.h | 1 + gcc/config/loongarch/loongarch-tune.h | 1 + gcc/config/loongarch/loongarch.cc | 143 ++++++++++++++---- gcc/config/loongarch/loongarch.h | 6 + gcc/config/loongarch/loongarch.md | 49 ++++++ gcc/config/loongarch/predicates.md | 8 + gcc/testsuite/gcc.target/loongarch/imm-load.c | 25 +++ 9 files changed, 208 insertions(+), 34 deletions(-) create mode 100644 gcc/testsuite/gcc.target/loongarch/imm-load.c