From patchwork Fri Dec 23 12:42:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "juzhe.zhong@rivai.ai" X-Patchwork-Id: 36259 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp296328wrn; Fri, 23 Dec 2022 04:43:08 -0800 (PST) X-Google-Smtp-Source: AMrXdXuz3FEXDE+WMX9MY5H8fz7fkW7mH/3BIbY773Ih/zicL7G4+2vmYhcl9NF59CtsN8N4tn5Z X-Received: by 2002:a05:6402:5d2:b0:477:f0d8:9e8b with SMTP id n18-20020a05640205d200b00477f0d89e8bmr7770842edx.33.1671799388206; Fri, 23 Dec 2022 04:43:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671799388; cv=none; d=google.com; s=arc-20160816; b=KOLN8pjsNaIHo0UQZH14Ieo+9qME3iUh+kAmuSaOBmm5jVhSUKeD4PTjTtA5xhJpoS tq4gU0JyqesrtTRFXlSxKvxP9t7CJAgpmUNvDR5le6ne72ocqe7F8iSn5AYqGOt+RjbQ mLLJRzm64mwDSw2Zq4y9Glz2ZV0yP5f/YqLNX7i77GmhilS/WdOYQAZ2kPas6WRBFfZI HNS2K/TIcNTSpEHnvoEj7JGpE0trx/Fx4LEtA+9hSX8bGsWPMp3lTI9obw0PX6CDXBHb Db7MH9gGjcZW1NBtlo2J088HVPxDWWxd7Q0NvwBJJLu1M54sdqPu+GcEw0tbYuzHgEuP osjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:feedback-id :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dmarc-filter:delivered-to; bh=Zujoa2y+LOhXA3UidoZh6TTr2utb5vDpuF0bKKUUysI=; b=RcoQAroNsiiQXiSyTTSiw07htwrbhu5NtwNsisd1e8bVlP7M/k5o61Ir3uWjfdb3F4 Tjx1zBWCrYpF4CJt/B/Bc77zR8Rmdfcn6yqYWnHWrFLHvzUyM/snxCMv9jYxrAYUvH1B 8256gZs2o0cU4NpFowGHW5961Eo1O2yNAg7K7xWZ29HZpVcQo4tY0lLxdq8ELJgi6j5R svtdpO/6p53sBO6HDBcq4W9GncGkeTHxRBr+Ah1ojOQYNVA451WPFJ3R+tRXjUXEOEc5 S6OgpuRXjzvmTDC+ifm220gsNyQjhJDr6MT6nwWLhdmisd/BqoQLLYNzx9Bbv9FvWiIA cAOQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id b17-20020a056402279100b0046dd7c3ceb5si2910639ede.475.2022.12.23.04.43.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Dec 2022 04:43:08 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 8FE04385B524 for ; Fri, 23 Dec 2022 12:43:04 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtpbgbr1.qq.com (smtpbgbr1.qq.com [54.207.19.206]) by sourceware.org (Postfix) with ESMTPS id 676843858D1E for ; Fri, 23 Dec 2022 12:42:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 676843858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivai.ai Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivai.ai X-QQ-mid: bizesmtp73t1671799350tw3b5s9n Received: from rios-cad5.localdomain ( [58.60.1.11]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 23 Dec 2022 20:42:29 +0800 (CST) X-QQ-SSF: 01400000002000E0L000B00A0000000 X-QQ-FEAT: 90EFqYDyPxDOvsCxYdWUSCAMusVw+h9lwPRiagGa0i6GiUJ6KsdxS7RD4fDoM n911Uk/4ikFK2+zAQLW7oZFcOUd/HJFuJuJQPcyMxJVpOj883/H1942gE5eZDtrq1eIwEuv sK2MnitdeM6xCx2Mlb/3hRxRGFEsoIJFPpCQx0gdK74wHGu98ymEW8E4xaAd7pO6d1mMb51 dUe0qR8FdXZG8ougmHfXRuWn2J9DhnMfdWuY+nsdkZdd5L7gfx+ZPj6xzb90y+LuAbFm+Cn 9gHOmwAlahHdUbzPD1TcfgwJ6e0F3FXSWRtVEMSYMSSL/snK5MQcAR7wIoKqiAe8sn73i9I amYAr7JyAus02251CjnADmjCf5W60RXFSjzzfayxvNoe0M15O3KFUhFJ6igm19apBXlfH8n X-QQ-GoodBg: 2 From: juzhe.zhong@rivai.ai To: gcc-patches@gcc.gnu.org Cc: schwab@linux-m68k.org, Ju-Zhe Zhong Subject: [PATCH] RISC-V: Fix ICE for avl_info deprecated copy and pp_print error. Date: Fri, 23 Dec 2022 20:42:27 +0800 Message-Id: <20221223124227.199969-1-juzhe.zhong@rivai.ai> X-Mailer: git-send-email 2.36.3 MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:rivai.ai:qybglogicsvr:qybglogicsvr7 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP 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: , 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?1753008715585431330?= X-GMAIL-MSGID: =?utf-8?q?1753008715585431330?= From: Ju-Zhe Zhong gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (change_insn): Remove pp_print. (avl_info::avl_info): Add copy function. (vector_insn_info::dump): Remove pp_print. * config/riscv/riscv-vsetvl.h: Add copy function. --- gcc/config/riscv/riscv-vsetvl.cc | 32 ++++++++------------------------ gcc/config/riscv/riscv-vsetvl.h | 1 + 2 files changed, 9 insertions(+), 24 deletions(-) diff --git a/gcc/config/riscv/riscv-vsetvl.cc b/gcc/config/riscv/riscv-vsetvl.cc index 01530c1ae75..a55b5a1c394 100644 --- a/gcc/config/riscv/riscv-vsetvl.cc +++ b/gcc/config/riscv/riscv-vsetvl.cc @@ -810,15 +810,6 @@ change_insn (function_info *ssa, insn_change change, insn_info *insn, fprintf (dump_file, "\nChange PATTERN of insn %d from:\n", INSN_UID (rinsn)); print_rtl_single (dump_file, PATTERN (rinsn)); - if (dump_flags & TDF_DETAILS) - { - fprintf (dump_file, "RTL_SSA info:\n"); - pretty_printer pp; - pp.buffer->stream = dump_file; - insn->print_full (&pp); - pp_printf (&pp, "\n"); - pp_flush (&pp); - } } insn_change_watermark watermark; @@ -834,19 +825,16 @@ change_insn (function_info *ssa, insn_change change, insn_info *insn, { fprintf (dump_file, "\nto:\n"); print_rtl_single (dump_file, PATTERN (rinsn)); - if (dump_flags & TDF_DETAILS) - { - fprintf (dump_file, "RTL_SSA info:\n"); - pretty_printer pp; - pp.buffer->stream = dump_file; - insn->print_full (&pp); - pp_printf (&pp, "\n"); - pp_flush (&pp); - } } return true; } +avl_info::avl_info (const avl_info &other) +{ + m_value = other.get_value (); + m_source = other.get_source (); +} + avl_info::avl_info (rtx value_in, set_info *source_in) : m_value (value_in), m_source (source_in) {} @@ -1355,12 +1343,8 @@ vector_insn_info::dump (FILE *file) const { if (get_insn ()) { - fprintf (file, "RTL_SSA insn_info="); - pretty_printer pp; - pp.buffer->stream = file; - get_insn ()->print_full (&pp); - pp_printf (&pp, "\n"); - pp_flush (&pp); + fprintf (file, "The real INSN="); + print_rtl_single (file, get_insn ()->rtl ()); } if (get_dirty_pat ()) { diff --git a/gcc/config/riscv/riscv-vsetvl.h b/gcc/config/riscv/riscv-vsetvl.h index ad9bb27cebf..6f27004fab1 100644 --- a/gcc/config/riscv/riscv-vsetvl.h +++ b/gcc/config/riscv/riscv-vsetvl.h @@ -125,6 +125,7 @@ private: public: avl_info () : m_value (NULL_RTX), m_source (nullptr) {} + avl_info (const avl_info &); avl_info (rtx, rtl_ssa::set_info *); rtx get_value () const { return m_value; } rtl_ssa::set_info *get_source () const { return m_source; }