From patchwork Tue Mar 13 01:02:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Sawdey X-Patchwork-Id: 884958 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-474626-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="fbVoLSpg"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 400c6F696cz9sLw for ; Tue, 13 Mar 2018 12:02:59 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:from:to:cc:date:content-type:mime-version:message-id; q=dns; s=default; b=JjegCi39j1tDav7FOe9GIcqb1bVW2Y5Aq359yq3n9yQ Esnhgt50cDLR4VCFT9thsdv1I17Q8diXx1aTyMs1i4IUW3d1vbsJ/Gi083R/fc/W vqsq6TJLUiwxUAlelbt+0OkdUIxM4IYY4GjJRwGY6ip5nFrOOBPQegjdzGWZ+Evc = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:from:to:cc:date:content-type:mime-version:message-id; s=default; bh=iaWuxRYAwgZMDkF0pgpIYa2UK3g=; b=fbVoLSpgHxqFnJh4O /Q7yW4kER8no2WKOQqoDXEmNu8v5MOyybVAkc/s3p93LqtWo40ap9aMnd+NIyrJs +vNY6SsI71vTPTjNUDGUbNggnP3Rq+4repEAENtYE45L+KmmlMC9bSZdQjXPXf6r 52P6iD4FfrIkcSkkKvGnPGNUCI= Received: (qmail 72509 invoked by alias); 13 Mar 2018 01:02:52 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 69600 invoked by uid 89); 13 Mar 2018 01:02:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.1 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, KAM_NUMSUBJECT, KAM_SHORT, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=004, 2.12, 009, 057 X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 13 Mar 2018 01:02:46 +0000 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2D0xQdS085949 for ; Mon, 12 Mar 2018 21:02:44 -0400 Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.152]) by mx0a-001b2d01.pphosted.com with ESMTP id 2gp0mxyde9-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Mon, 12 Mar 2018 21:02:43 -0400 Received: from localhost by e34.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 12 Mar 2018 19:02:43 -0600 Received: from b03cxnp08026.gho.boulder.ibm.com (9.17.130.18) by e34.co.us.ibm.com (192.168.1.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 12 Mar 2018 19:02:41 -0600 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w2D12f3211469090; Mon, 12 Mar 2018 18:02:41 -0700 Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1523F78047; Mon, 12 Mar 2018 19:02:41 -0600 (MDT) Received: from ragesh3a (unknown [9.80.228.32]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP id 416FA7803F; Mon, 12 Mar 2018 19:02:40 -0600 (MDT) Subject: PR target/84743 adjust reassociation widths for power8/power9 From: Aaron Sawdey To: GCC Patches Cc: David Edelsohn , Segher Boessenkool , rguenth@gcc.gnu.org, Bill Schmidt Date: Mon, 12 Mar 2018 20:02:39 -0500 Mime-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 18031301-0016-0000-0000-000008618D69 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008662; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000254; SDB=6.01002202; UDB=6.00509931; IPR=6.00781532; MB=3.00019996; MTD=3.00000008; XFM=3.00000015; UTC=2018-03-13 01:02:42 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18031301-0017-0000-0000-00003DD0BC00 Message-Id: <1520902959.6039.23.camel@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-03-12_14:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1803130012 X-IsSubscribed: yes Looking at CPU2017 results for different reassociation widths, things have shifted since I last looked at this with CPU2006 in early gcc7 timeframe. Best thing to do seems to be to set reassociation width to 1 for all integer modes, which is what the attached patch does. I also tried setting width to 1 for float modes PLUS_EXPR as this patch did for aarch64 but this does not seem to be helpful for power8. https://gcc.gnu.org/ml/gcc-patches/2018-02/msg01271.html Results below are % performance improvement on power8 comparing trunk with the attached patch vs trunk with --param tree-reassoc-width=1 to disable parallel reassociation for everything (first column of results) and trunk unmodified (second column of results). CPU2017 component vs width=1 vs trunk 500.perlbench_r -0.36% -0.15% 502.gcc_r 0.06% 0.04% 505.mcf_r 0.32% 0.24% 520.omnetpp_r 0.57% -0.95% 523.xalancbmk_r 1.45% 1.04% 525.x264_r -0.05% 0.09% 531.deepsjeng_r 0.04% 0.09% 541.leela_r 0.10% 0.72% 548.exchange2_r 0.08% 0.73% 557.xz_r 0.09% 2.12% CPU2017 int geo mean 0.23% 0.40% 503.bwaves_r 0.00% 0.01% 507.cactuBSSN_r 0.05% -0.02% 508.namd_r 0.00% 0.00% 510.parest_r -0.01% 0.20% 511.povray_r 0.03% -0.24% 519.lbm_r -0.04% -0.16% 521.wrf_r -0.01% -0.56% 526.blender_r -0.82% -0.47% 527.cam4_r -0.18% 0.06% 538.imagick_r -0.02% 0.01% 544.nab_r 0.00% 0.23% 549.fotonik3d_r 0.24% 0.54% 554.roms_r -0.05% 0.03% CPU2017 fp geo mean -0.06% -0.03% Bottom line is net improvement for CPU2017 int compared with either current trunk, or disabling parallel reassociation. For CPU2017 fp, very small overall degradation. Currently doing regstrap on ppc64le, ok for trunk if results look good? Thanks! Aaron 2018-03-12 Aaron Sawdey PR target/84743 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel reassociation for int modes. Index: gcc/config/rs6000/rs6000.c =================================================================== --- gcc/config/rs6000/rs6000.c (revision 258101) +++ gcc/config/rs6000/rs6000.c (working copy) @@ -10006,7 +10006,7 @@ if (VECTOR_MODE_P (mode)) return 4; if (INTEGRAL_MODE_P (mode)) - return opc == MULT_EXPR ? 4 : 6; + return 1; if (FLOAT_MODE_P (mode)) return 4; break;