From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18170 invoked by alias); 30 May 2011 12:39:08 -0000 Received: (qmail 18159 invoked by uid 22791); 30 May 2011 12:39:07 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from nikam.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 30 May 2011 12:38:53 +0000 Received: from localhost (okamzik.kam.mff.cuni.cz [195.113.17.168]) by nikam.ms.mff.cuni.cz (Postfix) with ESMTP id E6F6C9AC7E0; Mon, 30 May 2011 14:38:51 +0200 (CEST) Received: by localhost (Postfix, from userid 29025) id E3341D7391; Mon, 30 May 2011 14:38:51 +0200 (CEST) Date: Mon, 30 May 2011 15:12:00 -0000 From: Zdenek Dvorak To: Tom de Vries Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH PR45098, 7/10] Nowrap limits iterations Message-ID: <20110530123851.GA29240@kam.mff.cuni.cz> References: <4DD21F6E.4050308@codesourcery.com> <4DD221CF.4040002@codesourcery.com> <4DD3FD79.2020804@codesourcery.com> <20110518211157.GA19788@kam.mff.cuni.cz> <4DD63AE1.7070600@codesourcery.com> <20110521122407.GA22860@kam.mff.cuni.cz> <4DD7FD8F.20909@codesourcery.com> <4DE110D3.8080904@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4DE110D3.8080904@codesourcery.com> User-Agent: Mutt/1.5.18 (2008-05-17) 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 X-SW-Source: 2011-05/txt/msg02338.txt.bz2 Hi, > > The header block of the loop is bb 4, the latch block is bb 3: > > ... > > (gdb) p loop.header.index > > $4 = 4 > > (gdb) p loop.latch.index > > $5 = 3 > > ... > > > > The number of times the latch edge is executed, is 10. > > > > But loop->nb_iterations_upper_bound, or max_niter is 11: this is a bit strange, it looks like the # of iterations estimation is setting nb_iterations_upper_bound too conservatively (or I gave nb_iterations_upper_bound a different semantics than I remember -- but both my memory and the comment in cfgloop.h suggest that nb_iterations_upper_bound >= nb_iterations, i.e., that it should be 10 in your example), Zdenek