diff options
author | Jeff Law <law@redhat.com> | 2004-05-17 20:53:55 -0600 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2004-05-17 20:53:55 -0600 |
commit | dd7473111a63cdeb442d1b74535405739bf7e866 (patch) | |
tree | 8b09f05de2af4fbf629836a3810db742dd217646 /gcc/tree-phinodes.c | |
parent | b4117c306105c7e3279bbbabab1dd361a3b35b62 (diff) | |
download | gcc-dd7473111a63cdeb442d1b74535405739bf7e866.tar.gz |
toplev.h (flag_delete_null_pointer_checks): Move from here to...
* toplev.h (flag_delete_null_pointer_checks): Move from here to...
* flags.h (flag_delete_null_pointer_checks): Here.
* tree-flow.h (cprop_into_successor_phis): Add argument to prototype.
* tree-phinodes.c (resize_phi_node): Initialize PHI_ARG_NONZERO.
(add_phi_arg, remove_phi_arg_num): Similarly.
* tree-ssa-copy.c (cprop_into_successor_phis): Propagate nonzero
property into PHI nodes.
* tree-ssa-dom.c: Remove redundant inclusion of flags.h.
(record_equivalences_from_phis): If all PHI arguments are known to be
nonzero, then the result must be nonzero as well.
(cprop_into_phis): Pass nonzero_vars bitmap to cprop_into_successor_phis (record_equivalences_from_stmt): Check flag_delete_null_pointer_checks
appropriately. Walk the USE-DEF chains and propagate nonzero property
as appropriate.
* tree.h (PHI_ARG_NONZERO): Define.
(phi_arg_d): Add nonzero flag.
From-SVN: r81968
Diffstat (limited to 'gcc/tree-phinodes.c')
-rw-r--r-- | gcc/tree-phinodes.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree-phinodes.c b/gcc/tree-phinodes.c index e4fc904fd4a..8a8454c1c1c 100644 --- a/gcc/tree-phinodes.c +++ b/gcc/tree-phinodes.c @@ -280,6 +280,7 @@ resize_phi_node (tree *phi, int len) { PHI_ARG_DEF (new_phi, i) = NULL_TREE; PHI_ARG_EDGE (new_phi, i) = NULL; + PHI_ARG_NONZERO (new_phi, i) = false; } *phi = new_phi; @@ -366,6 +367,7 @@ add_phi_arg (tree *phi, tree def, edge e) PHI_ARG_DEF (*phi, i) = def; PHI_ARG_EDGE (*phi, i) = e; + PHI_ARG_NONZERO (*phi, i) = false; PHI_NUM_ARGS (*phi)++; } @@ -408,11 +410,13 @@ remove_phi_arg_num (tree phi, int i) { PHI_ARG_DEF (phi, i) = PHI_ARG_DEF (phi, num_elem - 1); PHI_ARG_EDGE (phi, i) = PHI_ARG_EDGE (phi, num_elem - 1); + PHI_ARG_NONZERO (phi, i) = PHI_ARG_NONZERO (phi, num_elem - 1); } /* Shrink the vector and return. */ PHI_ARG_DEF (phi, num_elem - 1) = NULL_TREE; PHI_ARG_EDGE (phi, num_elem - 1) = NULL; + PHI_ARG_NONZERO (phi, num_elem - 1) = false; PHI_NUM_ARGS (phi)--; /* If we removed the last PHI argument, then go ahead and |