From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27312 invoked by alias); 15 Jan 2013 22:22:19 -0000 Received: (qmail 27299 invoked by uid 22791); 15 Jan 2013 22:22:18 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_LOW,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; Tue, 15 Jan 2013 22:21:46 +0000 Received: from occam.kam.mff.cuni.cz (occam.kam.mff.cuni.cz [195.113.17.166]) by nikam.ms.mff.cuni.cz (Postfix) with ESMTP id DD86654180C; Tue, 15 Jan 2013 23:21:43 +0100 (CET) Received: by occam.kam.mff.cuni.cz (Postfix, from userid 29025) id D52FE2203C8; Tue, 15 Jan 2013 23:21:43 +0100 (CET) Date: Tue, 15 Jan 2013 22:22:00 -0000 From: Zdenek Dvorak To: Marek Polacek Cc: Steven Bosscher , GCC Patches , Richard Guenther Subject: Re: [PATCH] Fix PR55833 + cheaper checking Message-ID: <20130115222143.GA31497@kam.mff.cuni.cz> References: <20130110173143.GD20218@redhat.com> <20130110221943.GA14720@kam.mff.cuni.cz> <20130114161353.GB5414@redhat.com> <20130114175154.GA22128@kam.mff.cuni.cz> <20130114191131.GC5414@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130114191131.GC5414@redhat.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2013-01/txt/msg00814.txt.bz2 Hi, > > Yes, you should check whether you are in an irreducible loop. This is done by > > testing EDGE_IRREDUCIBLE_LOOP flag, > > Alright, I was wondering whether there's any other way. Unfortunately, > here I couldn't do something like > > if (loop_preheader_edge (loop)->flags & EDGE_IRREDUCIBLE_LOOP) > ... > because we're natural loop in a subloop, so I abused the loop exits of > this loop. Hopefully I'm not doing something evil. > > Updated patch attached. Ok if testing passes? Thanks, yes, this is OK, Zdenek > 2013-01-14 Richard Biener > Marek Polacek > > PR rtl-optimization/55833 > * loop-unswitch.c (unswitch_loops): Move loop verification... > (unswitch_single_loop): ...here. Call mark_irreducible_loops. > * cfgloopmanip.c (fix_loop_placement): Add IRRED_INVALIDATED parameter. > Set it to true when we're removing a loop from hierarchy tree in > an irreducible region. > (fix_bb_placements): Adjust caller. > (fix_loop_placements): Likewise. > > * gcc.dg/pr55833.c: New test.