[tree-ssa] Minor cleanup
law@redhat.com
law@redhat.com
Fri Jul 25 17:40:00 GMT 2003
This patch updates tree-ssa-dom.c to use may_propagate_copy in a couple
more places.
* tree-ssa-dom.c (optimize_block): Use may_propagate_copy.
Index: tree-ssa-dom.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa-dom.c,v
retrieving revision 1.1.2.10
diff -c -3 -p -r1.1.2.10 tree-ssa-dom.c
*** tree-ssa-dom.c 23 Jul 2003 23:48:16 -0000 1.1.2.10
--- tree-ssa-dom.c 25 Jul 2003 17:32:26 -0000
*************** optimize_block (basic_block bb, tree par
*** 262,269 ****
for (phi = phi_nodes (bb); phi; phi = TREE_CHAIN (phi))
if (PHI_NUM_ARGS (phi) == 1
&& TREE_CODE (PHI_ARG_DEF (phi, 0)) == SSA_NAME
! && ! SSA_NAME_OCCURS_IN_ABNORMAL_PHI (PHI_ARG_DEF (phi, 0))
! && ! SSA_NAME_OCCURS_IN_ABNORMAL_PHI (PHI_RESULT (phi)))
set_value_for (PHI_RESULT (phi), PHI_ARG_DEF (phi, 0),
const_and_copies);
/* Optimize each statement within the basic block. */
--- 262,268 ----
for (phi = phi_nodes (bb); phi; phi = TREE_CHAIN (phi))
if (PHI_NUM_ARGS (phi) == 1
&& TREE_CODE (PHI_ARG_DEF (phi, 0)) == SSA_NAME
! && may_propagate_copy (PHI_RESULT (phi), PHI_ARG_DEF (phi, 0)))
set_value_for (PHI_RESULT (phi), PHI_ARG_DEF (phi, 0),
const_and_copies);
/* Optimize each statement within the basic block. */
*************** optimize_block (basic_block bb, tree par
*** 292,299 ****
new = get_value_for (*orig_p, const_and_copies);
if (new
&& TREE_CODE (new) == SSA_NAME
! && !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (new)
! && !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (*orig_p))
*orig_p = new;
break;
}
--- 291,297 ----
new = get_value_for (*orig_p, const_and_copies);
if (new
&& TREE_CODE (new) == SSA_NAME
! && may_propagate_copy (new, *orig_p))
*orig_p = new;
break;
}
More information about the Gcc-patches
mailing list