From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116624 invoked by alias); 9 May 2016 09:47:00 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 116607 invoked by uid 89); 9 May 2016 09:46:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=41, Final, Hx-languages-length:1987 X-HELO: mail-wm0-f50.google.com Received: from mail-wm0-f50.google.com (HELO mail-wm0-f50.google.com) (74.125.82.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 09 May 2016 09:46:48 +0000 Received: by mail-wm0-f50.google.com with SMTP id v200so20065852wmv.1 for ; Mon, 09 May 2016 02:46:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-transfer-encoding; bh=3N9XIUInrkwXzfKgjE+Yzh0mpbm7ZO+SmvEBQ3hb6+4=; b=cLzk2MIDkBOYI37OO4guJNaxmNUGgwvbkXqxJETXbRQENkroHcyY6O4cgjvWCrw4Bp 8c+3x+t3b0UqPCAE24PTqbWymmjvL+v85csnFpg0QRcvwunf1TEts+GCOBtJV6Ev0oN/ HaYZgCnAcVA3rYXXpIaboXxAsA/gQa3kCT0DbwCQtZ6ylguAjZJlExuGHJToIkDwCLvz JLdZxOEP8q4c5swm072tc5IK4KlNpzkx9zZO+zeufiC+Oyhj5qKYRTGE1FA/W3HA9OnI /4VMfKt5mgzsDob+3gU8yQCGlMElQZocql+71b2dt94vnYXl927FuDo7ukg1crijssc5 hAig== X-Gm-Message-State: AOPr4FUX1bcKQ3Ars5eMtveAp8MiIJaYTn+N6mW5Ya80pCesGtLtYVbdL36LDlU1qKxHE3qdbvQfKk+Eu0Dpvw== MIME-Version: 1.0 X-Received: by 10.28.157.143 with SMTP id g137mr10142400wme.29.1462787206060; Mon, 09 May 2016 02:46:46 -0700 (PDT) Received: by 10.194.113.102 with HTTP; Mon, 9 May 2016 02:46:46 -0700 (PDT) In-Reply-To: <572C61B9.6060001@suse.cz> References: <29780c07dc7da0d8f41aa120665072a4098910d8.1461931011.git.mliska@suse.cz> <572C61B9.6060001@suse.cz> Date: Mon, 09 May 2016 09:47:00 -0000 Message-ID: Subject: Re: [PATCH 3/3] Enhance dumps of IVOPTS From: Richard Biener To: =?UTF-8?Q?Martin_Li=C5=A1ka?= Cc: GCC Patches , Jan Hubicka Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-05/txt/msg00589.txt.bz2 On Fri, May 6, 2016 at 11:19 AM, Martin Li=C5=A1ka wrote: > Hi. > > Honza asked me to explain the change more verbosely. > The patch simplify enhances verbose dump of IVOPTS so that > # of iterations is printed. Apart from that it also prints > invariant expression that are used during the algorithm which > considers a set of candidates which is improved. > > Main motivation for doing this was that sometimes the optimization > considers a constant integer as invariant expression (Bin Cheng > is working on removal of these) and that both IVs and IE are considered > by the cost model to occupy a register. Which is not ideal and > it sometimes tend to introduce more IVs that one would expect. > > =3D=3D=3D New format =3D=3D=3D: > Improved to: > cost: 27 (complexity 2) > cand_cost: 11 > cand_group_cost: 10 (complexity 2) > candidates: 3, 5 > group:0 --> iv_cand:5, cost=3D(2,0) > group:1 --> iv_cand:5, cost=3D(4,1) > group:2 --> iv_cand:5, cost=3D(4,1) > group:3 --> iv_cand:3, cost=3D(0,0) > group:4 --> iv_cand:3, cost=3D(0,0) > invariants 1, 6 > used invariant expressions: > inv_expr:3: ((sizetype) _976 - (sizetype) _922) * 4 > inv_expr:6: ((sizetype) _1335 - (sizetype) _922) * 4 > > > Original cost 27 (complexity 2) > > Final cost 27 (complexity 2) > > Selected IV set for loop 96 at original.f90:820, 5 avg niters, 2 expressi= ons, 2 IVs: > > =3D=3D=3D Before =3D=3D=3D: > > Improved to: > cost: 27 (complexity 2) > cand_cost: 11 > cand_group_cost: 10 (complexity 2) > candidates: 3, 5 > group:0 --> iv_cand:5, cost=3D(2,0) > group:1 --> iv_cand:5, cost=3D(4,1) > group:2 --> iv_cand:5, cost=3D(4,1) > group:3 --> iv_cand:3, cost=3D(0,0) > group:4 --> iv_cand:3, cost=3D(0,0) > invariants 1, 6 > > Original cost 27 (complexity 2) > > Final cost 27 (complexity 2) > > Selected IV set for loop 96 at original.f90:820, 2 IVs: But it slows donw compile-time just for enhanced dump files. Can you make the new hash-map conditional on dumping? Richard. > > Martin