From patchwork Tue Jan 29 23:27:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Bosscher X-Patchwork-Id: 216726 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 C679A2C0080 for ; Wed, 30 Jan 2013 10:28:41 +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=1360106922; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:In-Reply-To:References:From:Date: Message-ID:Subject:To:Cc:Content-Type:Mailing-List:Precedence: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=IrPweZqokURwYsZBznIlWp47J24=; b=MP8jDDWZh50XkN5 Srf3MW5g2K42TDDp59Bq7F52oai10cjTDa8c7Lw4HgJihVMk3TptihW1LCue3eFa f3Kd8e7HKnOZBLFyfmkyVAQFMuRRV8NlI0zKgbx8SlRJS1/JHhWqyp7w5KktTzg1 JPUS+ifbXp1Chg2jzkVm7tddue70= 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:X-Received:MIME-Version:Received:In-Reply-To:References:From:Date:Message-ID:Subject:To:Cc:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=Hk8KhIGAeicpgt2HBKD3ofAgLk8NGBVsvJZRRLMqwOqF/NypIh7YlIYnTnezI5 VMtRMu/nwPWbPQi3NNTlj14wFtNLHWjijY6SgQ2/1As4tK4x2hS4W5pBCdkhkTyy bZWuoQ4zd/eiu1whK/A727ezScKIf3VB+pA8ibhLcsH4c=; Received: (qmail 30896 invoked by alias); 29 Jan 2013 23:28:38 -0000 Received: (qmail 30888 invoked by uid 22791); 29 Jan 2013 23:28:37 -0000 X-SWARE-Spam-Status: No, hits=-5.2 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, KHOP_RCVD_TRUST, KHOP_THREADED, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, TW_FW X-Spam-Check-By: sourceware.org Received: from mail-vc0-f171.google.com (HELO mail-vc0-f171.google.com) (209.85.220.171) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 29 Jan 2013 23:28:32 +0000 Received: by mail-vc0-f171.google.com with SMTP id p1so666165vcq.30 for ; Tue, 29 Jan 2013 15:28:31 -0800 (PST) X-Received: by 10.52.178.161 with SMTP id cz1mr2680468vdc.18.1359502111840; Tue, 29 Jan 2013 15:28:31 -0800 (PST) MIME-Version: 1.0 Received: by 10.58.215.38 with HTTP; Tue, 29 Jan 2013 15:27:50 -0800 (PST) In-Reply-To: References: From: Steven Bosscher Date: Wed, 30 Jan 2013 00:27:50 +0100 Message-ID: Subject: Re: [PATCH] Fix RTL fwprop compile-time for PR56113 To: GCC Patches Cc: Richard Biener , Paolo Bonzini X-IsSubscribed: yes 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, Jan 30, 2013 at 12:01 AM, Steven Bosscher wrote: > To prevent that mistake in the future, I've add an assert in dominance.c. Hmm, that worked with my release-checking compiler of course, but fails in at least tree-ssa-dom.c (same as for fwprop.c, loop_optimizer_init destroys fast queries) and tree-ssa-loop-im.c (not sure yet why). NB, the fwprop.c change is independent and should go in. The domwalk.c thing is something to maybe postpone to gcc 4.9. Testing this patch now: Index: domwalk.c =================================================================== --- domwalk.c (revision 195559) +++ domwalk.c (working copy) @@ -147,8 +147,17 @@ walk_dominator_tree (struct dom_walk_dat bitmap_clear (visited); bitmap_set_bit (visited, ENTRY_BLOCK_PTR->index); + /* Make sure dominance information is available, and compute fast queries + if necessary. */ + gcc_assert (dom_info_state (walk_data->dom_direction) >= DOM_NO_FAST_QUERY); + calculate_dominance_info (walk_data->dom_direction); + while (true) { + /* Thou shall not modify the dominator tree while walking it + (nor present it without fast queries available). */ + gcc_assert (dom_info_state (walk_data->dom_direction) == DOM_OK); + /* Don't worry about unreachable blocks. */ if (EDGE_COUNT (bb->preds) > 0 || bb == ENTRY_BLOCK_PTR