[PATCH][iab merge] Merge missing bits of struct-aliasing with arrays

Richard Guenther rguenther@suse.de
Fri Jan 6 11:57:00 GMT 2006


On Thu, 5 Jan 2006, Daniel Berlin wrote:

> On Thu, 2006-01-05 at 16:31 +0100, Richard Guenther wrote:
> > On Thu, 5 Jan 2006, Diego Novillo wrote:
> > 
> > > On Thursday 05 January 2006 09:07, Richard Guenther wrote:
> > > 
> > > > I guess simply moving mark_new_vars_to_rename to the place of
> > > > update_stmt will work here, too?
> > > >
> > > Yes, it should.
> > 
> > I applied the patch with re-checking your suggested corrections, but
> > leaving tree-ssa-pre.c alone as mucking with it causes bootstrap to 
> > fail.
> > 
> 
> This is because update_stmt calls ends up creating the statement
> annotation if it doesn't exist, but mark_new_vars_to_rename does not.
> 
> If you throw a call to get_stmt_ann at the top of
> mark_new_vars_to_rename, it should work.

Right, that works.  Bootstrapped and regtested on 
x86_64-unknown-linux-gnu.  Ok for mainline?

Thanks,
Richard.

2006-01-06  Richard Guenther  <rguenther@suse.de>

	* tree-dfa.c (mark_new_vars_to_rename): Create stmt
	annotation, if necessary.
	* tree-ssa-pre.c (create_expression_by_pieces): Remove
	redundant calls to update_stmt.
	* tree-ssa-forwprop.c (tidy_after_forward_propagate_addr):
	Likewise.

Index: tree-dfa.c
===================================================================
*** tree-dfa.c	(revision 109410)
--- tree-dfa.c	(working copy)
*************** mark_new_vars_to_rename (tree stmt)
*** 796,801 ****
--- 796,802 ----
    if (TREE_CODE (stmt) == PHI_NODE)
      return;
  
+   get_stmt_ann (stmt);
    vars_in_vops_to_rename = BITMAP_ALLOC (NULL);
  
    /* Before re-scanning the statement for operands, mark the existing
Index: tree-ssa-pre.c
===================================================================
*** tree-ssa-pre.c	(revision 109410)
--- tree-ssa-pre.c	(working copy)
*************** create_expression_by_pieces (basic_block
*** 2150,2157 ****
  	  vn_add (forcedname, val);
  	  bitmap_value_replace_in_set (NEW_SETS (block), forcedname);
  	  bitmap_value_replace_in_set (AVAIL_OUT (block), forcedname);
! 	  update_stmt (stmt);
! 	  mark_new_vars_to_rename (tsi_stmt (tsi));
  	}
        tsi = tsi_last (stmts);
        tsi_link_after (&tsi, forced_stmts, TSI_CONTINUE_LINKING);
--- 2150,2156 ----
  	  vn_add (forcedname, val);
  	  bitmap_value_replace_in_set (NEW_SETS (block), forcedname);
  	  bitmap_value_replace_in_set (AVAIL_OUT (block), forcedname);
! 	  mark_new_vars_to_rename (stmt);
  	}
        tsi = tsi_last (stmts);
        tsi_link_after (&tsi, forced_stmts, TSI_CONTINUE_LINKING);
*************** create_expression_by_pieces (basic_block
*** 2179,2185 ****
    tsi = tsi_last (stmts);
    tsi_link_after (&tsi, newexpr, TSI_CONTINUE_LINKING);
    VEC_safe_push (tree, heap, inserted_exprs, newexpr);
-   update_stmt (newexpr);
    mark_new_vars_to_rename (newexpr);
  
    /* Add a value handle to the temporary.
--- 2178,2183 ----
Index: tree-ssa-forwprop.c
===================================================================
*** tree-ssa-forwprop.c	(revision 109410)
--- tree-ssa-forwprop.c	(working copy)
*************** forward_propagate_into_cond (tree cond_e
*** 444,451 ****
  static void
  tidy_after_forward_propagate_addr (tree stmt)
  {
-   mark_new_vars_to_rename (stmt);
- 
    /* We may have turned a trapping insn into a non-trapping insn.  */
    if (maybe_clean_or_replace_eh_stmt (stmt, stmt)
        && tree_purge_dead_eh_edges (bb_for_stmt (stmt)))
--- 444,449 ----
*************** tidy_after_forward_propagate_addr (tree 
*** 454,460 ****
    if (TREE_CODE (TREE_OPERAND (stmt, 1)) == ADDR_EXPR)
       recompute_tree_invariant_for_addr_expr (TREE_OPERAND (stmt, 1));
  
!   update_stmt (stmt);
  }
  
  /* STMT defines LHS which is contains the address of the 0th element
--- 452,458 ----
    if (TREE_CODE (TREE_OPERAND (stmt, 1)) == ADDR_EXPR)
       recompute_tree_invariant_for_addr_expr (TREE_OPERAND (stmt, 1));
  
!   mark_new_vars_to_rename (stmt);
  }
  
  /* STMT defines LHS which is contains the address of the 0th element



More information about the Gcc-patches mailing list