From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 5C71F3858015 for ; Wed, 4 Aug 2021 00:07:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5C71F3858015 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 17403TbQ128921; Tue, 3 Aug 2021 20:07:55 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3a7brpwspf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 03 Aug 2021 20:07:55 -0400 Received: from m0098393.ppops.net (m0098393.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 1740499S130592; Tue, 3 Aug 2021 20:07:54 -0400 Received: from ppma01wdc.us.ibm.com (fd.55.37a9.ip4.static.sl-reverse.com [169.55.85.253]) by mx0a-001b2d01.pphosted.com with ESMTP id 3a7brpwsp5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 03 Aug 2021 20:07:54 -0400 Received: from pps.filterd (ppma01wdc.us.ibm.com [127.0.0.1]) by ppma01wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 17403tmv017180; Wed, 4 Aug 2021 00:07:53 GMT Received: from b01cxnp23033.gho.pok.ibm.com (b01cxnp23033.gho.pok.ibm.com [9.57.198.28]) by ppma01wdc.us.ibm.com with ESMTP id 3a4x5cmtrw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 04 Aug 2021 00:07:53 +0000 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 17407rft41288104 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 4 Aug 2021 00:07:53 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E30DB124B41; Wed, 4 Aug 2021 00:07:52 +0000 (GMT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 78651124B3D; Wed, 4 Aug 2021 00:07:52 +0000 (GMT) Received: from smtpclient.apple (unknown [9.211.61.10]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTPS; Wed, 4 Aug 2021 00:07:52 +0000 (GMT) From: Aaron Sawdey Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Add ops_num to targetm.sched.reassociation_width hook Message-Id: Date: Tue, 3 Aug 2021 19:07:51 -0500 Cc: Richard Biener , Segher Boessenkool , Bill Schmidt To: gcc X-Mailer: Apple Mail (2.3654.120.0.1.13) X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: VQ-IPdU3KGRKCjE6CyYWQmjR9fFKQ3Fy X-Proofpoint-GUID: K2hzcIpM0ocpgyNbWxpQIOjg6CTsyCgo X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-08-03_08:2021-08-03, 2021-08-03 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 impostorscore=0 adultscore=0 lowpriorityscore=0 mlxscore=0 phishscore=0 mlxlogscore=999 malwarescore=0 priorityscore=1501 clxscore=1015 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2107140000 definitions=main-2108030147 X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Aug 2021 00:07:57 -0000 Richard, So, I=E2=80=99m noticing that in get_reassociation_width() we know how = many ops (ops_num) are in the expression being considered for parallel = reassociation, but this is not passed to the target hook. In my testing = this seems like it might be useful to have. If you determine the maximum = width that gives additional speedup for a large number of terms, and = then use that as the width from the target hook, = get_reassociation_width() is more aggressive than you would like for = small expressions with maybe 4-16 terms and produces code that is slower = than optimal. For example in many cases you want to continue using a = width of 1 until you get to 16 terms or so. My testing shows this to be = the case for power8, power9, and power10 processors.=20 So, I=E2=80=99m wondering how it might be received if I posted a patch = that adds this to the reassociation_width target hook (and of course = fixes all uses of that target hook)? Thanks! Aaron Aaron Sawdey, Ph.D. sawdey@linux.ibm.com IBM Linux on POWER Toolchain =20