From eb1b7c50a469480d0887989fdf170003c92808a8 Mon Sep 17 00:00:00 2001 From: rguenth Date: Mon, 7 Jun 2010 13:10:10 +0000 Subject: [PATCH] 2010-06-07 Richard Guenther * gimplify.c (gimplify_cleanup_point_expr): For empty body and EH-only cleanup drop the cleanup instead of inserting it unconditionally. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160371 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/gimplify.c | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 550bb7049843..a2abec15d117 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-06-07 Richard Guenther + + * gimplify.c (gimplify_cleanup_point_expr): For empty body + and EH-only cleanup drop the cleanup instead of inserting it + unconditionally. + 2010-06-07 Ira Rosen * doc/tm.texi (TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST): Update diff --git a/gcc/gimplify.c b/gcc/gimplify.c index cb4358ca9bdb..354092ae4292 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -5140,9 +5140,10 @@ gimplify_cleanup_point_expr (tree *expr_p, gimple_seq *pre_p) { /* Note that gsi_insert_seq_before and gsi_remove do not scan operands, unlike some other sequence mutators. */ - gsi_insert_seq_before_without_update (&iter, - gimple_wce_cleanup (wce), - GSI_SAME_STMT); + if (!gimple_wce_cleanup_eh_only (wce)) + gsi_insert_seq_before_without_update (&iter, + gimple_wce_cleanup (wce), + GSI_SAME_STMT); gsi_remove (&iter, true); break; } -- 2.47.2