aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-scalar-evolution.c
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@redhat.com>2006-12-11 17:50:53 +0000
committerDiego Novillo <dnovillo@gcc.gnu.org>2006-12-11 12:50:53 -0500
commit9b3b55a10516cf15d37f39ac473ad86b6ae3c3ce (patch)
treec10c3e1e438be55ec7fabae41f6449845ab479fc /gcc/tree-scalar-evolution.c
parent546447ae68630c589ab35c109430caa4656a2453 (diff)
downloadgcc-9b3b55a10516cf15d37f39ac473ad86b6ae3c3ce.zip
gcc-9b3b55a10516cf15d37f39ac473ad86b6ae3c3ce.tar.gz
gcc-9b3b55a10516cf15d37f39ac473ad86b6ae3c3ce.tar.bz2
* tree-scalar-evolution.c (scev_const_prop):
* tree-phinodes.c (remove_phi_node): Add argument RELEASE_LHS_P. If given, release the SSA name on the LHS of the PHI node. Update all users. * tree-ssa-dce.c: Remove forward declarations for static functions. Re-arrange functions bodies as needed. (find_obviously_necessary_stmts): Never mark PHI nodes as obviously necessary. From-SVN: r119740
Diffstat (limited to 'gcc/tree-scalar-evolution.c')
-rw-r--r--gcc/tree-scalar-evolution.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/tree-scalar-evolution.c b/gcc/tree-scalar-evolution.c
index 10d5da5..bd47bef 100644
--- a/gcc/tree-scalar-evolution.c
+++ b/gcc/tree-scalar-evolution.c
@@ -2929,8 +2929,9 @@ scev_const_prop (void)
}
}
- /* Remove the ssa names that were replaced by constants. We do not remove them
- directly in the previous cycle, since this invalidates scev cache. */
+ /* Remove the ssa names that were replaced by constants. We do not
+ remove them directly in the previous cycle, since this
+ invalidates scev cache. */
if (ssa_names_to_remove)
{
bitmap_iterator bi;
@@ -2941,7 +2942,7 @@ scev_const_prop (void)
phi = SSA_NAME_DEF_STMT (name);
gcc_assert (TREE_CODE (phi) == PHI_NODE);
- remove_phi_node (phi, NULL);
+ remove_phi_node (phi, NULL, true);
}
BITMAP_FREE (ssa_names_to_remove);
@@ -2998,11 +2999,10 @@ scev_const_prop (void)
|| contains_abnormal_ssa_name_p (def))
continue;
- /* Eliminate the phi node and replace it by a computation outside
+ /* Eliminate the PHI node and replace it by a computation outside
the loop. */
def = unshare_expr (def);
- SET_PHI_RESULT (phi, NULL_TREE);
- remove_phi_node (phi, NULL_TREE);
+ remove_phi_node (phi, NULL_TREE, false);
ass = build2 (GIMPLE_MODIFY_STMT, void_type_node, rslt, NULL_TREE);
SSA_NAME_DEF_STMT (rslt) = ass;