From patchwork Thu Jan 9 12:10:22 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: 308749 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 04E5E2C0099 for ; Thu, 9 Jan 2014 23:10:40 +1100 (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:subject:references :in-reply-to:content-type; q=dns; s=default; b=g1B5uCeDa13vGaed9 H3uVnSULJXWWrPzLtii8+Ibi/iLYLcoiWjML/1YSSTOz3fN8uqn82A3dqs46bXZw t6MZkIsXVuHXxOPOqR1sZAZa1FNPPxbFYdAHJrmuq2F6Us1/paC6LpUO5cvJTK58 9uMM8APfSoQVDghf5N0gIei/ac= 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:subject:references :in-reply-to:content-type; s=default; bh=Fsuoa6+RldS2yg3KwWTSy3k V/UI=; b=X7AMEGnswobSAu173IpTHo9NLBFwv9MrWatFbgBewRplBqm4/kNSp3b VAEcbHHOzQ93ztmCjMOP4ODNFLTnZdOu9p0lwR3HDyljy7hRsCVWvt41g4FMBOFQ HsF5WT03XvtzPumgCto1VrybS2c2osPuZT70i/fLWlLiI0eWSXuw= Received: (qmail 9491 invoked by alias); 9 Jan 2014 12:10:33 -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 9322 invoked by uid 89); 9 Jan 2014 12:10:30 -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, 09 Jan 2014 12:10:29 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1W1ERN-00061t-La from Tom_deVries@mentor.com ; Thu, 09 Jan 2014 04:10:25 -0800 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 9 Jan 2014 04:10:25 -0800 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.2.247.3; Thu, 9 Jan 2014 12:10:23 +0000 Message-ID: <52CE91AE.1080504@mentor.com> Date: Thu, 9 Jan 2014 13:10:22 +0100 From: Tom de Vries User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Richard Biener , Subject: Re: [PATCH] Fix PR59715 References: In-Reply-To: On 09-01-14 10:16, Richard Biener wrote: > > This fixes PR59715 by splitting critical edges again before > code sinking. The critical edge splitting done before PRE > was designed to survive until sinking originally, but at least > since 4.5 PRE now eventually cleans up the CFG and thus undos > critical edge splitting. This results in less than optimal > code placement (and lost opportunities) for sinking and it > breaks (at least) the virtual operand updating code which > assumes that critical edges are still split. > Richard, this follow-up patch: - notes in pass_pre that PROP_no_crit_edge is destroyed - notes in pass_sink_code that PROP_no_crit_edge is not required (because it's now ensured by the pass itself) Build and reg-tested pr59715.c on x86_64. OK for stage3 trunk if bootstrap and full reg-test on x86_64 is ok? Thanks, - Tom 2014-01-09 Tom de Vries * tree-ssa-pre.c (pass_data_pre): Add comment about PROP_no_crit_edges in properties_required. Add PROP_no_crit_edges to properties_destroyed. * tree-ssa-sink.c (pass_data_sink_code): Comment out PROP_no_crit_edges in PROP_no_crit_edges. diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c index 2de5db5..1e55356 100644 --- a/gcc/tree-ssa-pre.c +++ b/gcc/tree-ssa-pre.c @@ -4798,9 +4798,11 @@ const pass_data pass_data_pre = true, /* has_gate */ true, /* has_execute */ TV_TREE_PRE, /* tv_id */ + /* PROP_no_crit_edges is ensured by placing pass_split_crit_edges before + pass_pre. */ ( PROP_no_crit_edges | PROP_cfg | PROP_ssa ), /* properties_required */ 0, /* properties_provided */ - 0, /* properties_destroyed */ + PROP_no_crit_edges, /* properties_destroyed */ TODO_rebuild_alias, /* todo_flags_start */ TODO_verify_ssa, /* todo_flags_finish */ }; diff --git a/gcc/tree-ssa-sink.c b/gcc/tree-ssa-sink.c index a72a9e8..b56c4fe 100644 --- a/gcc/tree-ssa-sink.c +++ b/gcc/tree-ssa-sink.c @@ -604,7 +604,9 @@ const pass_data pass_data_sink_code = true, /* has_gate */ true, /* has_execute */ TV_TREE_SINK, /* tv_id */ - ( PROP_no_crit_edges | PROP_cfg | PROP_ssa ), /* properties_required */ + /* PROP_no_crit_edges is ensured by running split_critical_edges in + execute_sink_code. */ + ( /* PROP_no_crit_edges | */ PROP_cfg | PROP_ssa ), /* properties_required */ 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */