aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-eh.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2013-05-14 08:41:14 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2013-05-14 08:41:14 +0000
commitdf35498ae56e297e0de7279127cab265e71fc2d2 (patch)
treee2758f55604b98ac19e1ac0628d449bd797c8d7c /gcc/tree-eh.c
parentcc6e7ecebfe763429ea4d089948c9fd26dc04c3c (diff)
downloadgcc-df35498ae56e297e0de7279127cab265e71fc2d2.zip
gcc-df35498ae56e297e0de7279127cab265e71fc2d2.tar.gz
gcc-df35498ae56e297e0de7279127cab265e71fc2d2.tar.bz2
re PR middle-end/57235 (ICE verify_ssa failied)
2013-05-14 Richard Biener <rguenther@suse.de> PR middle-end/57235 * tree-eh.c (sink_clobbers): Give up for successors with multiple predecessors and no virtual uses. * g++.dg/torture/pr57235.C: New testcase. From-SVN: r198863
Diffstat (limited to 'gcc/tree-eh.c')
-rw-r--r--gcc/tree-eh.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c
index fb6fd86..fc350bd 100644
--- a/gcc/tree-eh.c
+++ b/gcc/tree-eh.c
@@ -3312,6 +3312,7 @@ sink_clobbers (basic_block bb)
gimple_stmt_iterator gsi, dgsi;
basic_block succbb;
bool any_clobbers = false;
+ unsigned todo = 0;
/* Only optimize if BB has a single EH successor and
all predecessor edges are EH too. */
@@ -3410,9 +3411,22 @@ sink_clobbers (basic_block bb)
SET_USE (PHI_ARG_DEF_PTR_FROM_EDGE (vphi, succe), gimple_vuse (stmt));
SET_USE (gimple_vuse_op (stmt), vuse);
}
+ /* If there isn't a single predecessor but no virtual PHI node
+ arrange for virtual operands to be renamed. */
+ else if (gimple_vuse_op (stmt) != NULL_USE_OPERAND_P
+ && !single_pred_p (succbb))
+ {
+ /* In this case there will be no use of the VDEF of this stmt.
+ ??? Unless this is a secondary opportunity and we have not
+ removed unreachable blocks yet, so we cannot assert this.
+ Which also means we will end up renaming too many times. */
+ SET_USE (gimple_vuse_op (stmt), gimple_vop (cfun));
+ mark_virtual_operands_for_renaming (cfun);
+ todo |= TODO_update_ssa_only_virtuals;
+ }
}
- return 0;
+ return todo;
}
/* At the end of inlining, we can lower EH_DISPATCH. Return true when