diff options
| author | Richard Guenther <rguenth@gcc.gnu.org> | 2005-05-26 21:07:38 +0000 | 
|---|---|---|
| committer | Jeff Law <law@gcc.gnu.org> | 2005-05-26 15:07:38 -0600 | 
| commit | 450c300706be35ba449d1a9d834e108ddcc3e74c (patch) | |
| tree | f756e596fcc002b13c70d53236c7e41461b341c7 /gcc | |
| parent | a04323f4cbc780f714ee126c1d7b3953b0c04e44 (diff) | |
| download | gcc-450c300706be35ba449d1a9d834e108ddcc3e74c.zip gcc-450c300706be35ba449d1a9d834e108ddcc3e74c.tar.gz gcc-450c300706be35ba449d1a9d834e108ddcc3e74c.tar.bz2 | |
tree-ssa-forwprop.c (forward_propagate_addr_expr): See through ADDR_EXPR in finding place to propagate into.
        * tree-ssa-forwprop.c (forward_propagate_addr_expr):
        See through ADDR_EXPR in finding place to propagate into.
From-SVN: r100223
Diffstat (limited to 'gcc')
| -rw-r--r-- | gcc/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/tree-ssa-forwprop.c | 10 | 
2 files changed, 12 insertions, 3 deletions
| diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bc7e8f9..1657e7d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-05-26  Richard Guenther  <rguenth@gcc.gnu.org> + +	* tree-ssa-forwprop.c (forward_propagate_addr_expr): +	See through ADDR_EXPR in finding place to propagate into. +  2005-05-26  Kazu Hirata  <kazu@cs.umass.edu>  	* c-common.c, c-parser.c, cfgbuild.c, cfghooks.c, cfghooks.h, diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c index 17da0f1..de85b7c 100644 --- a/gcc/tree-ssa-forwprop.c +++ b/gcc/tree-ssa-forwprop.c @@ -560,7 +560,8 @@ forward_propagate_addr_expr (tree stmt)    if (bb_for_stmt (use_stmt)->loop_depth > stmt_loop_depth)      return false; -  /* Strip away any outer COMPONENT_REF/ARRAY_REF nodes from the LHS.  */ +  /* Strip away any outer COMPONENT_REF/ARRAY_REF nodes from the LHS.  +     ADDR_EXPR will not appear on the LHS.  */    lhs = TREE_OPERAND (use_stmt, 0);    while (TREE_CODE (lhs) == COMPONENT_REF || TREE_CODE (lhs) == ARRAY_REF)      lhs = TREE_OPERAND (lhs, 0); @@ -591,9 +592,12 @@ forward_propagate_addr_expr (tree stmt)        return true;      } -  /* Strip away any outer COMPONENT_REF/ARRAY_REF nodes from the RHS.  */ +  /* Strip away any outer COMPONENT_REF, ARRAY_REF or ADDR_EXPR +     nodes from the RHS.  */    rhs = TREE_OPERAND (use_stmt, 1); -  while (TREE_CODE (rhs) == COMPONENT_REF || TREE_CODE (rhs) == ARRAY_REF) +  while (TREE_CODE (rhs) == COMPONENT_REF +	 || TREE_CODE (rhs) == ARRAY_REF +	 || TREE_CODE (rhs) == ADDR_EXPR)      rhs = TREE_OPERAND (rhs, 0);    /* Now see if the RHS node is an INDIRECT_REF using NAME.  If so,  | 
