diff options
author | Jeff Law <law@redhat.com> | 2017-12-18 21:35:59 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2017-12-18 21:35:59 -0700 |
commit | 129b5668f18f6d4bc40a21566f75bdc280c594ea (patch) | |
tree | 5e2da121cd6f7fc6dbdcf0dd4f7e989938f1815f /gcc | |
parent | 8c12859969bf45a04ef62762e130da3b5d2bc6dc (diff) | |
download | gcc-129b5668f18f6d4bc40a21566f75bdc280c594ea.zip gcc-129b5668f18f6d4bc40a21566f75bdc280c594ea.tar.gz gcc-129b5668f18f6d4bc40a21566f75bdc280c594ea.tar.bz2 |
Revert
2017-11-19 Jeff Law <law@redhat.com>
* tree-ssa-dom.c (record_equivalences_from_phis): Fix handling
of degenerates resulting from ignoring an edge.
From-SVN: r255802
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/tree-ssa-dom.c | 21 |
2 files changed, 13 insertions, 16 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d165b5c..b5854f7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2017-12-18 Jeff Law <law@redhat.com> + + Revert + 2017-11-19 Jeff Law <law@redhat.com> + + * tree-ssa-dom.c (record_equivalences_from_phis): Fix handling + of degenerates resulting from ignoring an edge. + 2017-12-18 Martin Sebor <msebor@redhat.com> PR middle-end/83373 diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c index 93c992a..05bc807 100644 --- a/gcc/tree-ssa-dom.c +++ b/gcc/tree-ssa-dom.c @@ -1109,7 +1109,6 @@ record_equivalences_from_phis (basic_block bb) tree rhs = NULL; size_t i; - bool ignored_phi_arg = false; for (i = 0; i < gimple_phi_num_args (phi); i++) { tree t = gimple_phi_arg_def (phi, i); @@ -1120,14 +1119,10 @@ record_equivalences_from_phis (basic_block bb) if (lhs == t) continue; - /* We want to track if we ignored any PHI arguments because - their associated edges were not executable. This impacts - whether or not we can use any equivalence we might discover. */ + /* If the associated edge is not marked as executable, then it + can be ignored. */ if ((gimple_phi_arg_edge (phi, i)->flags & EDGE_EXECUTABLE) == 0) - { - ignored_phi_arg = true; - continue; - } + continue; t = dom_valueize (t); @@ -1152,15 +1147,9 @@ record_equivalences_from_phis (basic_block bb) a useful equivalence. We do not need to record unwind data for this, since this is a true assignment and not an equivalence inferred from a comparison. All uses of this ssa name are dominated - by this assignment, so unwinding just costs time and space. - - Note that if we ignored a PHI argument and the resulting equivalence - is SSA_NAME = SSA_NAME. Then we can not use the equivalence as the - uses of the LHS SSA_NAME are not necessarily dominated by the - assignment of the RHS SSA_NAME. */ + by this assignment, so unwinding just costs time and space. */ if (i == gimple_phi_num_args (phi) - && may_propagate_copy (lhs, rhs) - && (!ignored_phi_arg || TREE_CODE (rhs) != SSA_NAME)) + && may_propagate_copy (lhs, rhs)) set_ssa_name_value (lhs, rhs); } } |