From patchwork Wed Sep 7 14:20:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schulze Frielinghaus X-Patchwork-Id: 1072 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5044:0:0:0:0:0 with SMTP id h4csp1167205wrt; Wed, 7 Sep 2022 07:22:24 -0700 (PDT) X-Google-Smtp-Source: AA6agR76BSHW6m9RChnoB5xFqcxTgkKG65JqqoqM5gFxoRR3yzyrtBo5LyNFwnbE96i+3V7Ajvri X-Received: by 2002:a17:906:2245:b0:715:7c81:e39d with SMTP id 5-20020a170906224500b007157c81e39dmr2643393ejr.262.1662560544552; Wed, 07 Sep 2022 07:22:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662560544; cv=none; d=google.com; s=arc-20160816; b=rxAUPKX+drG6/vNuaEm/YLKbul/5mLq7m8mPeCSSJjgfovBqdu6gkD/K9uV1+IqYYq k1tgh1wId23Tjzy0GLi6Uo8Rm61ZgFqtZENwZ4gDgHpcUIFWG4m0DFsxDqqCJkxKJExn ATlKNXxPotWNN6W+zLky8lbfkTYOn5I2Rb7MMcYkTz/4elnzRObeconTjKY2m8kE01N+ lCQvQrSKK1feSDX+m1yZN+CYX5tNdHVLHDhLIRySsiLlZThjlPTTvMQprgYkZJWYfDuJ 8I9FKigTYBvurxLcYJ91eSrkXZisPP/IDDtNloTxZZ94bRjxe+u0BqIZPpQeZ948jcf7 sqXw== 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:references:in-reply-to :message-id:date:subject:to:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=D1f33JAdxZ/Ev8W373L8wUCcRUJGMXXq7DGiJ4Dx3D8=; b=LdbJJiTFtGKzMynxmCtDPiqLzNE7HKrIL4lTJwh/7Kb8NNiWlPqqd899NEmu2ZHMlu prmWQCLUgE8dHtOfSRqrF28/pLrbqp/iGQRzRv+2gZJDMHfU9vm2xlWAVCMv1MAmgKwJ UcFZthS/iClKRdcrU8hVCBxXmZLY1XkfxIUyso4h3cc4IwiliiA2SDxvqJ7dYO6kJ+7F W933+jZQxZUn43F8fnTcy6xtEwMpTu4VpQrz5dbXTz6VriczxyGRrNfifGdKXqvc2ftC hdPbEDIadipAyQsBpS9fzUOZdPsNd9NFQsD/sM1yEQ26vZxSg0WdWyStMb0pHILrRkQF v7iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=YzcvtofJ; 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 dt2-20020a170907728200b0072a92eb16b7si13110651ejc.5.2022.09.07.07.22.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Sep 2022 07:22:24 -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=YzcvtofJ; 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 A6B38385021C for ; Wed, 7 Sep 2022 14:22:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A6B38385021C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662560542; bh=D1f33JAdxZ/Ev8W373L8wUCcRUJGMXXq7DGiJ4Dx3D8=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=YzcvtofJpFdZC2myAEsGE5RsYPWP0FZK90kr3+P7rbHenM2hQ9XOqNnaDJ1po5kdR MKJB+CYuyS3fIiZ+Vhzmnq4QT4v+fD+/lVgUOJexPMcRCw4eRuIhjhfWx3OfUEs6ay oehUWZTHTmO8yUWZNvitrdUQFvN6qsTuGOAvtP90= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 9C718384D189 for ; Wed, 7 Sep 2022 14:20:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9C718384D189 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 287E9JF1009939 for ; Wed, 7 Sep 2022 14:20:46 GMT Received: from ppma03fra.de.ibm.com (6b.4a.5195.ip4.static.sl-reverse.com [149.81.74.107]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3jevdrhbmu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 07 Sep 2022 14:20:45 +0000 Received: from pps.filterd (ppma03fra.de.ibm.com [127.0.0.1]) by ppma03fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 287E7tV1029519 for ; Wed, 7 Sep 2022 14:20:43 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma03fra.de.ibm.com with ESMTP id 3jbxj8ux51-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 07 Sep 2022 14:20:43 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 287EKdKD43254124 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 7 Sep 2022 14:20:39 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CF0F3A4051; Wed, 7 Sep 2022 14:20:39 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AA1B7A404D; Wed, 7 Sep 2022 14:20:39 +0000 (GMT) Received: from t8345026.lnxne.boe (unknown [9.152.108.100]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Wed, 7 Sep 2022 14:20:39 +0000 (GMT) To: gcc-patches@gcc.gnu.org Subject: [PATCH 2/2] var-tracking: Add entry values up to max register mode Date: Wed, 7 Sep 2022 16:20:26 +0200 Message-Id: <20220907142026.936922-3-stefansf@linux.ibm.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220907142026.936922-1-stefansf@linux.ibm.com> References: <20220907142026.936922-1-stefansf@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: uy3ZU8YC-OZg55W7ev_JG0vR8YoOns7U X-Proofpoint-ORIG-GUID: uy3ZU8YC-OZg55W7ev_JG0vR8YoOns7U X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-07_08,2022-09-07_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 impostorscore=0 bulkscore=0 priorityscore=1501 spamscore=0 mlxlogscore=908 adultscore=0 lowpriorityscore=0 phishscore=0 clxscore=1015 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2209070055 X-Spam-Status: No, score=-8.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, 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: Stefan Schulze Frielinghaus via Gcc-patches From: Stefan Schulze Frielinghaus Reply-To: Stefan Schulze Frielinghaus 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?1743321085541106706?= X-GMAIL-MSGID: =?utf-8?q?1743321085541106706?= For parameter of type integer which do not consume a whole register (modulo sign/zero extension) this patch adds entry values up to maximal register mode. gcc/ChangeLog: * var-tracking.cc (vt_add_function_parameter): Add entry values up to maximal register mode. --- gcc/var-tracking.cc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/gcc/var-tracking.cc b/gcc/var-tracking.cc index 235981d100f..9c40ec4fb8b 100644 --- a/gcc/var-tracking.cc +++ b/gcc/var-tracking.cc @@ -9906,6 +9906,23 @@ vt_add_function_parameter (tree parm) VAR_INIT_STATUS_INITIALIZED, NULL, INSERT); } } + + if (GET_MODE_CLASS (mode) == MODE_INT) + { + machine_mode wider_mode_iter; + FOR_EACH_WIDER_MODE (wider_mode_iter, mode) + { + if (!HWI_COMPUTABLE_MODE_P (wider_mode_iter)) + break; + rtx wider_reg + = gen_rtx_REG (wider_mode_iter, REGNO (incoming)); + cselib_val *wider_val + = cselib_lookup_from_insn (wider_reg, wider_mode_iter, 1, + VOIDmode, get_insns ()); + preserve_value (wider_val); + record_entry_value (wider_val, wider_reg); + } + } } } else if (GET_CODE (incoming) == PARALLEL && !dv_onepart_p (dv))