From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5527 invoked by alias); 18 Nov 2014 22:28:16 -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 5515 invoked by uid 89); 18 Nov 2014 22:28:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-oi0-f45.google.com Received: from mail-oi0-f45.google.com (HELO mail-oi0-f45.google.com) (209.85.218.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 18 Nov 2014 22:28:13 +0000 Received: by mail-oi0-f45.google.com with SMTP id a141so9241422oig.18 for ; Tue, 18 Nov 2014 14:28:11 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.60.150.129 with SMTP id ui1mr15684452oeb.38.1416349691684; Tue, 18 Nov 2014 14:28:11 -0800 (PST) Received: by 10.76.185.7 with HTTP; Tue, 18 Nov 2014 14:28:11 -0800 (PST) In-Reply-To: References: <544035C2.8000703@redhat.com> Date: Tue, 18 Nov 2014 22:53:00 -0000 Message-ID: Subject: Re: [PATCH] Simple improvement for predicate computation in if-convert phase. From: "H.J. Lu" To: Yuri Rumyantsev Cc: Jeff Law , gcc-patches , Igor Zamyatin , Richard Biener Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-11/txt/msg02373.txt.bz2 On Fri, Oct 17, 2014 at 6:08 AM, Yuri Rumyantsev wrote: > Jeff, > > I prepared another patch that includes test-case as you requested. > > Below are answers on your questions. > >> First, for the benefit of anyone trying to understand what you're doing, defining what "cd equivalent" means would be >helpful. > > I added the following comment to function: > > fwe call basic blocks bb1 and bb2 > cd-equivalent if they are executed under the same condition. > > > Is it sufficient? > >>So, do you have a case where the dominated_by_p test above is true and is_predicated(bb) returns true as well? I think this >part of the change is largely responsible for the hack you're doing with having the function scoped static variable join_bb. > > I don't have such test-case and I assume that if bb is always > executed, it is not predicated. > > I also deleted "join_bb" in my changes. > > > Is it OK for trunk now. > > Thanks. > Yuri. > > 2014-10-17 Yuri Rumyantsev > gcc/ChangeLog > > * tree-if-conv.c (add_to_predicate_list): Check unconditionally > that bb is always executed to early exit. Use predicate of > cd-equivalent block for join blocks if it exists. > (if_convertible_loop_p_1): Recompute POST_DOMINATOR tree. > (tree_if_conversion): Free post-dominance information. > > gcc/testsuite/ChangeLog > > * gcc/dg/tree-ssa/ifc-cd.c: New test. > This caused: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63941 -- H.J.