This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR 19552


On Mon, 2005-02-21 at 17:38 -0800, Devang Patel wrote:
> Skip all leading labels, not just first one, while inserting
> statements to replace phi nodes. Bootstrapped and tested on
> powerpc-darwin.
> 
> 2005-02-21  Devang Patel  <dpatel@apple.com>
> 
>          PR 19552
>          * tree-if-conv.c (find_phie_replacement_condition,
>          replace_phie_with_cond_modify_expr): Insert after leading 
> labels.
> 
>          * g++.dg/tree-ssa/pr19552.C: New test.
It seems to me you'd be better off calling bsi_after_labels in 
process_phi_nodes rather than bsi_start as shown in the attached
patch.

That seems cleaner -- why correct a bogus insertion point when
we can just get the right one from the start?

jeff

*** tree-if-conv.c	Mon Jan 17 10:15:10 2005
--- j.c	Tue Feb 22 09:50:03 2005
*************** process_phi_nodes (struct loop *loop)
*** 830,836 ****
  	continue;
  
        phi = phi_nodes (bb);
!       bsi = bsi_start (bb);
  
        /* BB has two predecessors. Using predecessor's aux field, set
  	 appropriate condition for the PHI node replacement.  */
--- 830,836 ----
  	continue;
  
        phi = phi_nodes (bb);
!       bsi = bsi_after_labels (bb);
  
        /* BB has two predecessors. Using predecessor's aux field, set
  	 appropriate condition for the PHI node replacement.  */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]