From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id C2F913858CDA for ; Mon, 26 Sep 2022 06:10:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C2F913858CDA Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28Q4ZQLM031041 for ; Mon, 26 Sep 2022 06:10:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : subject : message-id : references : mime-version : content-type : in-reply-to; s=pp1; bh=T5nNl9rX6hN8ofrBb0gHX3ZVhf2O84yzKyzB/ZYrYgQ=; b=oq1slbcZWOmT5VwncobLmdCiXfTjaSCTVw5EBseIlzhOCxmghXJg5HFfkBvOAW5nIUMg KDfNwBtcuf/F6b5ctgarqQpr0RAXswdhjGX8wGZIIdVj+SEP2uXL+gv0w+nEoLHYvFy7 JH2e+Uaabp8xnB+RbbiGgtY+uXz+tfK4pVVpSxtx/+HkbFOXv/Z98CR4ykXzlAY3AC2x P+Ryzk09lOjXgmlP9Sj0weUBci0hQqDLafAJiBYPnYiqgIqavE8ne7k7bO1Wnh7/aY9i 0ig5lCLkezSwBv/oS7cuhRUCh+NyA83jOFYcB5SDKaKFVpZftUP3nPnBjuoOZagiHbCy MA== Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3jtby73grn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 26 Sep 2022 06:10:19 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 28Q65OkF032184 for ; Mon, 26 Sep 2022 06:10:17 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma06ams.nl.ibm.com with ESMTP id 3jss5j1y73-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 26 Sep 2022 06:10:17 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 28Q6AFEf38863134 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 26 Sep 2022 06:10:15 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EE853A4057 for ; Mon, 26 Sep 2022 06:10:14 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C543DA4040 for ; Mon, 26 Sep 2022 06:10:14 +0000 (GMT) Received: from li-42a4824c-28a0-11b2-a85c-f55c0d5956ce.ibm.com (unknown [9.145.70.150]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTPS for ; Mon, 26 Sep 2022 06:10:14 +0000 (GMT) Date: Mon, 26 Sep 2022 08:10:14 +0200 From: Stefan Schulze Frielinghaus To: gcc-patches@gcc.gnu.org Subject: Re: [PATCH 1/2] cselib: Keep track of further subvalue relations Message-ID: References: <20220907142026.936922-1-stefansf@linux.ibm.com> <20220907142026.936922-2-stefansf@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220907142026.936922-2-stefansf@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: _C6_llI3-xDsbCm6me9NGBBeiGBnZuKc X-Proofpoint-GUID: _C6_llI3-xDsbCm6me9NGBBeiGBnZuKc 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-26_04,2022-09-22_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 priorityscore=1501 adultscore=0 phishscore=0 spamscore=0 lowpriorityscore=0 suspectscore=0 impostorscore=0 mlxscore=0 bulkscore=0 mlxlogscore=492 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2209260036 X-Spam-Status: No, score=-9.6 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 autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Ping. On Wed, Sep 07, 2022 at 04:20:25PM +0200, Stefan Schulze Frielinghaus wrote: > Whenever a new cselib value is created check whether a smaller value > exists which is contained in the bigger one. If so add a subreg > relation to locs of the smaller one. > > gcc/ChangeLog: > > * cselib.cc (new_cselib_val): Keep track of further subvalue > relations. > --- > gcc/cselib.cc | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) > > diff --git a/gcc/cselib.cc b/gcc/cselib.cc > index 6a5609786fa..9b582e5d3d6 100644 > --- a/gcc/cselib.cc > +++ b/gcc/cselib.cc > @@ -1569,6 +1569,26 @@ new_cselib_val (unsigned int hash, machine_mode mode, rtx x) > e->locs = 0; > e->next_containing_mem = 0; > > + scalar_int_mode int_mode; > + if (REG_P (x) && is_int_mode (mode, &int_mode) > + && REG_VALUES (REGNO (x)) != NULL > + && (!cselib_current_insn || !DEBUG_INSN_P (cselib_current_insn))) > + { > + rtx copy = shallow_copy_rtx (x); > + scalar_int_mode narrow_mode_iter; > + FOR_EACH_MODE_UNTIL (narrow_mode_iter, int_mode) > + { > + PUT_MODE_RAW (copy, narrow_mode_iter); > + cselib_val *v = cselib_lookup (copy, narrow_mode_iter, 0, VOIDmode); > + if (v) > + { > + rtx sub = lowpart_subreg (narrow_mode_iter, e->val_rtx, int_mode); > + if (sub) > + new_elt_loc_list (v, sub); > + } > + } > + } > + > if (dump_file && (dump_flags & TDF_CSELIB)) > { > fprintf (dump_file, "cselib value %u:%u ", e->uid, hash); > -- > 2.37.2 >