diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2011-09-25 14:55:12 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@adacore.com> | 2011-09-25 14:55:12 +0000 |
commit | 8c2d6fb80e0891746e91d0d9649183df64ec88a3 (patch) | |
tree | d97d634cdfdfd430b5c57a9004ad433969b2d30b /gcc/tree-eh.c | |
parent | bc5c8a3a71df5a20e39a646754d6ca14796fc917 (diff) |
* tree-eh.c (cleanup_empty_eh): Allow a call to __builtin_stack_restore
if there is no outgoing edge.
* tree-scalar-evolution.c (simple_iv): Accept all kinds of pointer and
integral types.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@179165 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-eh.c')
-rw-r--r-- | gcc/tree-eh.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c index f10d72d1d68..3a582678f33 100644 --- a/gcc/tree-eh.c +++ b/gcc/tree-eh.c @@ -3863,8 +3863,15 @@ cleanup_empty_eh (eh_landing_pad lp) return cleanup_empty_eh_unsplit (bb, e_out, lp); } - /* The block should consist only of a single RESX statement. */ + /* The block should consist only of a single RESX statement, modulo a + preceding call to __builtin_stack_restore if there is no outgoing + edge, since the call can be eliminated in this case. */ resx = gsi_stmt (gsi); + if (!e_out && gimple_call_builtin_p (resx, BUILT_IN_STACK_RESTORE)) + { + gsi_next (&gsi); + resx = gsi_stmt (gsi); + } if (!is_gimple_resx (resx)) return false; gcc_assert (gsi_one_before_end_p (gsi)); |