From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 112953 invoked by alias); 6 May 2016 09:19:59 -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 112940 invoked by uid 89); 6 May 2016 09:19:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy=enhances, Hx-languages-length:1685, IVs, ivs X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Fri, 06 May 2016 09:19:57 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 64C16AB9D; Fri, 6 May 2016 09:19:54 +0000 (UTC) Subject: Re: [PATCH 3/3] Enhance dumps of IVOPTS To: gcc-patches@gcc.gnu.org References: <29780c07dc7da0d8f41aa120665072a4098910d8.1461931011.git.mliska@suse.cz> Cc: Jan Hubicka From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Message-ID: <572C61B9.6060001@suse.cz> Date: Fri, 06 May 2016 09:19:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <29780c07dc7da0d8f41aa120665072a4098910d8.1461931011.git.mliska@suse.cz> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-05/txt/msg00441.txt.bz2 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. === New format ===: Improved to: cost: 27 (complexity 2) cand_cost: 11 cand_group_cost: 10 (complexity 2) candidates: 3, 5 group:0 --> iv_cand:5, cost=(2,0) group:1 --> iv_cand:5, cost=(4,1) group:2 --> iv_cand:5, cost=(4,1) group:3 --> iv_cand:3, cost=(0,0) group:4 --> iv_cand:3, cost=(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 expressions, 2 IVs: === Before ===: Improved to: cost: 27 (complexity 2) cand_cost: 11 cand_group_cost: 10 (complexity 2) candidates: 3, 5 group:0 --> iv_cand:5, cost=(2,0) group:1 --> iv_cand:5, cost=(4,1) group:2 --> iv_cand:5, cost=(4,1) group:3 --> iv_cand:3, cost=(0,0) group:4 --> iv_cand:3, cost=(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: Martin