From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 88035 invoked by alias); 13 Aug 2015 08:26:30 -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 88020 invoked by uid 89); 13 Aug 2015 08:26:29 -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 X-HELO: mail-ob0-f174.google.com Received: from mail-ob0-f174.google.com (HELO mail-ob0-f174.google.com) (209.85.214.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 13 Aug 2015 08:26:28 +0000 Received: by obbhe7 with SMTP id he7so31830570obb.0 for ; Thu, 13 Aug 2015 01:26:26 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.60.39.136 with SMTP id p8mr33338252oek.45.1439454386468; Thu, 13 Aug 2015 01:26:26 -0700 (PDT) Received: by 10.76.134.100 with HTTP; Thu, 13 Aug 2015 01:26:26 -0700 (PDT) In-Reply-To: <000401d0c918$d7a2e780$86e8b680$@arm.com> References: <000401d0c918$d7a2e780$86e8b680$@arm.com> Date: Thu, 13 Aug 2015 08:27:00 -0000 Message-ID: Subject: Re: [PATCH GCC]Improve bound information in loop niter analysis From: "Bin.Cheng" To: Bin Cheng Cc: gcc-patches List Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg00680.txt.bz2 Ping. Thanks, bin On Tue, Jul 28, 2015 at 5:36 PM, Bin Cheng wrote: > Hi, > Loop niter computes inaccurate bound information for different loops. This > patch is to improve it by using loop initial condition in > determine_value_range. Generally, loop niter is computed by subtracting > start var from end var in loop exit condition. Moreover, loop bound is > computed using value range information of both start and end variables. > Basic idea of this patch is to check if loop initial condition implies more > range information for both start/end variables. If yes, we refine range > information and use that to compute loop bound. > With this improvement, more accurate loop bound information is computed for > test cases added by this patch. > > Is it OK? > > Thanks, > bin > > 2015-07-28 Bin Cheng > > * tree-ssa-loop-niter.c (refine_value_range_using_guard): New. > (determine_value_range): Call refine_value_range_using_guard for > each loop initial condition to improve value range. > > gcc/testsuite/ChangeLog > 2015-07-28 Bin Cheng > > * gcc.dg/tree-ssa/loop-bound-1.c: New test. > * gcc.dg/tree-ssa/loop-bound-3.c: New test. > * gcc.dg/tree-ssa/loop-bound-5.c: New test.