From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 34928 invoked by alias); 17 Dec 2015 21:07:41 -0000 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 Received: (qmail 34906 invoked by uid 89); 17 Dec 2015 21:07:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=7817, shrink-wrap.c, UD:shrink-wrap.c, shrinkwrapc X-HELO: gcc1-power7.osuosl.org Received: from gcc1-power7.osuosl.org (HELO gcc1-power7.osuosl.org) (140.211.15.137) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 17 Dec 2015 21:07:38 +0000 Received: by gcc1-power7.osuosl.org (Postfix, from userid 10019) id 755BC1C0728; Thu, 17 Dec 2015 21:07:35 +0000 (UTC) From: Segher Boessenkool To: gcc-patches@gcc.gnu.org Cc: jakub@redhat.com, bschmidt@redhat.com, Segher Boessenkool Subject: [PATCH] shrink-wrap: Once more PRs 67778, 68634, and now 68909 Date: Thu, 17 Dec 2015 21:07:00 -0000 Message-Id: X-IsSubscribed: yes X-SW-Source: 2015-12/txt/msg01827.txt.bz2 It turns out v4 wasn't quite complete anyway; so here "v5". If a candidate PRE cannot get the prologue because a block BB is reachable from it, but PRE does not dominate BB, we try again with the dominators of PRE. That "try again" needs to again consider BB though, we aren't done with it. This fixes this problem. Tested on the 68909 testcase, and bootstrapped and regression checked on powerpc64-linux. Is this okay for trunk? Segher 2015-12-17 Segher Boessenkool PR rtl-optimization/67778 PR rtl-optimization/68634 PR rtl-optimization/68909 * shrink-wrap.c (try_shrink_wrapping): If BB isn't dominated by PRE, push it back on VEC. --- gcc/shrink-wrap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/shrink-wrap.c b/gcc/shrink-wrap.c index f65b0c3..85e5a8b 100644 --- a/gcc/shrink-wrap.c +++ b/gcc/shrink-wrap.c @@ -781,6 +781,7 @@ try_shrink_wrapping (edge *entry_edge, bitmap_head *bb_with, if (!dominated_by_p (CDI_DOMINATORS, bb, pre)) { ok = false; + vec.quick_push (bb); break; } -- 1.9.3