From patchwork Wed Nov 28 18:24:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Polacek X-Patchwork-Id: 202526 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]) by ozlabs.org (Postfix) with SMTP id AFEB22C0085 for ; Thu, 29 Nov 2012 05:39:54 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1354732796; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To:User-Agent: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=B0xdlyLWTe7zq34jjMtF iEtQQbM=; b=TdZe0BY5vy54olni7RkWYZtxZuJ8Ydk6PUqluNb6Qdg7KXhHkXKb oMhhe2KLGSDuw8l6YXT2WSXbU/FBjQw03Bs/2kqJt/sinN19gXOPov/7sOoJ2NoB 3iPRapl1utga1idgFnKPaxK7Av27lR65abkCo78adZD+KC2eE7VO2RM= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:User-Agent:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=feiumbH/6drGtH2YdKXD28Hf903F2jQFZ/bfQqFfYqmyZru2dZWFiavF647l71 qczBI8Qkj4LuB53KSQz6XY/HhlmD7elkSy1fck9EcHouMXyQnReAVqz2Df/T239f LbWI02Nbshf0aC3kcS/sTR/tIN5+JN76WtjvWwwq91Xlw=; Received: (qmail 24122 invoked by alias); 28 Nov 2012 18:39:46 -0000 Received: (qmail 23992 invoked by uid 22791); 28 Nov 2012 18:39:44 -0000 X-SWARE-Spam-Status: No, hits=-6.6 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_DNSWL_HI, RCVD_IN_HOSTKARMA_W, RP_MATCHES_RCVD, SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 28 Nov 2012 18:39:40 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qASIP1Bl013193 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 28 Nov 2012 13:25:01 -0500 Received: from redhat.com (ovpn-116-24.ams2.redhat.com [10.36.116.24]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id qASIOvQQ014435 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 28 Nov 2012 13:25:00 -0500 Date: Wed, 28 Nov 2012 19:24:57 +0100 From: Marek Polacek To: Eric Botcazou Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Don't bypass blocks with multiple latch edges (PR middle-end/54838) Message-ID: <20121128182457.GB26585@redhat.com> References: <20121126142843.GH17362@redhat.com> <1544820.Re9E01eJrW@polaris> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1544820.Re9E01eJrW@polaris> 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-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On Wed, Nov 28, 2012 at 10:52:17AM +0100, Eric Botcazou wrote: > No, I don't think that's the problem. The above messages are admittedly a bit > terse, they should say: > > JUMP-BYPASS: Proved reg 59 in jump_insn 15 equals constant (const_int 3 [0x3]) > when BB 4 is entered from BB 9. Redirect edge 9->4 to 5. > > so you can have different constants for BB 3 and BB 9. The patch to tweak the > dump messages along these lines is pre-approved. Ouch. Okay, I'll post a separate patch for improving the message. > The ICE in merge_latch_edges means that the loop structure and the CFG aren't > in sync anymore. Does the cprop pass modify the former without declaring it? I admit I'm not sure what to look at, maybe cprop should have in properties_destroyed PROP_loops? Well, then we need to remove one assert in loop-init.c. So something like: This quashes the ICE. I've regtested it, it caused one regression though: FAIL: gcc.dg/unroll_5.c scan-rtl-dump-times loop2_unroll "realistic bound: 2999999" 1 But there probably is something else. Thanks for the review, Marek --- gcc/cprop.c.mp 2012-11-28 16:55:03.520375191 +0100 +++ gcc/cprop.c 2012-11-28 16:55:35.992246623 +0100 @@ -1927,7 +1927,7 @@ struct rtl_opt_pass pass_rtl_cprop = TV_CPROP, /* tv_id */ PROP_cfglayout, /* properties_required */ 0, /* properties_provided */ - 0, /* properties_destroyed */ + PROP_loops, /* properties_destroyed */ 0, /* todo_flags_start */ TODO_df_finish | TODO_verify_rtl_sharing | TODO_verify_flow | TODO_ggc_collect /* todo_flags_finish */ --- gcc/loop-init.c.mp 2012-11-28 16:55:08.924398879 +0100 +++ gcc/loop-init.c 2012-11-28 16:55:17.684437276 +0100 @@ -54,8 +54,6 @@ loop_optimizer_init (unsigned flags) } else { - gcc_assert (cfun->curr_properties & PROP_loops); - /* Ensure that the dominators are computed, like flow_loops_find does. */ calculate_dominance_info (CDI_DOMINATORS);