From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28344 invoked by alias); 30 May 2005 15:48:46 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 15827 invoked by uid 22791); 30 May 2005 15:33:51 -0000 Received: from monty-python.gnu.org (HELO monty-python.gnu.org) (199.232.76.173) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 30 May 2005 15:33:51 +0000 Received: from [212.29.160.93] (helo=x93.infopact.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DcVHG-000607-Dn for gcc@gcc.gnu.org; Sun, 29 May 2005 17:24:58 -0400 Received: from 63-66-dsl.ipact.nl (63-66-dsl.ipact.nl [84.35.66.63]) by x93.infopact.nl (8.12.10/8.12.10) with ESMTP id j4TLNULp000318 for ; Sun, 29 May 2005 23:23:31 +0200 From: Steven Bosscher To: gcc@gcc.gnu.org Subject: ifcvt.c question Date: Mon, 30 May 2005 17:26:00 -0000 User-Agent: KMail/1.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200505292323.29675.stevenb@suse.de> X-Spam-Score: undef - spam-scanning disabled X-SW-Source: 2005-05/txt/msg01625.txt.bz2 Hi, ifcvt.c has this code in find_if_block(): 2718 /* If the THEN block has no successors, conditional execution can still 2719 make a conditional call. Don't do this unless the ELSE block has 2720 only one incoming edge -- the CFG manipulation is too ugly otherwise. 2721 Check for the last insn of the THEN block being an indirect jump, which 2722 is listed as not having any successors, but confuses the rest of the CE 2723 code processing. ??? we should fix this in the future. */ 2724 if (EDGE_COUNT (then_bb->succs) == 0) 2725 { 2726 if (single_pred_p (else_bb)) 2727 { 2728 rtx last_insn = BB_END (then_bb); 2729 2730 while (last_insn 2731 && NOTE_P (last_insn) 2732 && last_insn != BB_HEAD (then_bb)) 2733 last_insn = PREV_INSN (last_insn); 2734 2735 if (last_insn 2736 && JUMP_P (last_insn) 2737 && ! simplejump_p (last_insn)) 2738 return FALSE; 2739 2740 join_bb = else_bb; 2741 else_bb = NULL_BLOCK; 2742 } 2743 else 2744 return FALSE; 2745 } 2746 I don't understand what lines 2728 to 2741 are for. Could someone give an example of when we can have a then_bb that has no successors, but still ends in something that satisfies simplejump_p()? What kind of strange indirect jump would that be? And shouldn't the check just use computed_jump_p() if that is what it is looking for?? Gr. Steven