From patchwork Thu Jul 31 08:31:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 375150 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 0AE0114012D for ; Thu, 31 Jul 2014 18:31:33 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; q=dns; s=default; b=BMd/ZzY26NMbCDElt JvUvgyl9neFzDkJaf/Ux/E0js4JoyUjr5MMAx+jVA8/LqqvnHH8c38gbI5y4681Z x69Au/3DR7RMp6E8Po0+4EEGplFA5VvetG+8NGSjg2gZXWGQU+TAhkNk9SaFfOgQ anhOYPhepOn+bscfjBOXGK6rS0= 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 :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; s=default; bh=L1PEQEyo02yVbf6c9KHCwzE IgmI=; b=FlLfnKEQMREr11oXim914uFcKgr/xchKML2LNBCb71vPRNhOEvGdjxM xqr5cBG6T/IYZY2NWsGTNmbBq0OAO7r4OLuYVVTvxAEgYGXvnQAXqxZ/Kmlg2kn1 ogsyjL5iqsVBPGG0SCBRzleo+iaXOLZY1emfqo+JuQAIaur+HFQ4= Received: (qmail 31446 invoked by alias); 31 Jul 2014 08:31:27 -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 31416 invoked by uid 89); 31 Jul 2014 08:31:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 31 Jul 2014 08:31:20 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1XCllW-00057i-MD from Tom_deVries@mentor.com ; Thu, 31 Jul 2014 01:31:10 -0700 Received: from SVR-IES-FEM-05.mgc.mentorg.com ([137.202.0.112]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Thu, 31 Jul 2014 01:31:10 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-05.mgc.mentorg.com (137.202.0.112) with Microsoft SMTP Server id 14.2.247.3; Thu, 31 Jul 2014 09:31:08 +0100 Message-ID: <53D9FEC9.9080905@mentor.com> Date: Thu, 31 Jul 2014 10:31:05 +0200 From: Tom de Vries User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Marek Polacek CC: GCC Patches , Richard Biener Subject: Re: [PATCH] Fix PR56426 References: <20130225195311.GB25197@redhat.com> In-Reply-To: <20130225195311.GB25197@redhat.com> On 25-02-13 20:53, Marek Polacek wrote: > 2013-02-25 Marek Polacek > > PR tree-optimization/56426 > * tree-ssa-loop.c (tree_ssa_loop_init): Always call > scev_initialize. > > * gcc.dg/pr56436.c: New test. > > --- gcc/tree-ssa-loop.c.mp 2013-02-25 13:06:47.212132327 +0100 > +++ gcc/tree-ssa-loop.c 2013-02-25 20:09:30.668978936 +0100 > @@ -70,10 +70,13 @@ tree_ssa_loop_init (void) > | LOOPS_HAVE_RECORDED_EXITS); > rewrite_into_loop_closed_ssa (NULL, TODO_update_ssa); > > + /* We might discover new loops, e.g. when turning irreducible > + regions into reducible. */ > + scev_initialize (); > + > if (number_of_loops () <= 1) > return 0; > > - scev_initialize (); > return 0; > } > Marek, moving scev_initialize up leaves the if-clause as dead code. This patches removes that dead code. Bootstrapped and reg-tested with tree-ssa.exp. Committed as trivial. Thanks, - Tom 2014-07-30 Tom de Vries * tree-ssa-loop.c (pass_tree_loop_init::execute): Remove dead code. diff --git a/gcc/tree-ssa-loop.c b/gcc/tree-ssa-loop.c index 7c52748..d0c9980 100644 --- a/gcc/tree-ssa-loop.c +++ b/gcc/tree-ssa-loop.c @@ -168,7 +168,7 @@ public: }; // class pass_tree_loop_init unsigned int -pass_tree_loop_init::execute (function *fun) +pass_tree_loop_init::execute (function *fun ATTRIBUTE_UNUSED) { loop_optimizer_init (LOOPS_NORMAL | LOOPS_HAVE_RECORDED_EXITS); @@ -178,9 +178,6 @@ pass_tree_loop_init::execute (function *fun) regions into reducible. */ scev_initialize (); - if (number_of_loops (fun) <= 1) - return 0; - return 0; }