]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Revert
authorJakub Jelinek <jakub@redhat.com>
Tue, 13 Dec 2011 14:00:58 +0000 (15:00 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 13 Dec 2011 14:00:58 +0000 (15:00 +0100)
2011-12-12  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/51481
* gimple-fold.c (gimple_fold_call): Call
maybe_clean_or_replace_eh_stmt.  Avoid optimization if stmt has EH
edges, but gimple_fold_builtin result can't throw.

From-SVN: r182284

gcc/ChangeLog
gcc/gimple-fold.c

index 876245b6976f4914d9cb46e451f49b884f9e1dd7..f6ba6b4d6c48c46fcc172ed586bcb1a548ba5261 100644 (file)
@@ -1,3 +1,13 @@
+2011-12-13  Jakub Jelinek  <jakub@redhat.com>
+
+       Revert
+       2011-12-12  Jakub Jelinek  <jakub@redhat.com>
+
+       PR tree-optimization/51481
+       * gimple-fold.c (gimple_fold_call): Call
+       maybe_clean_or_replace_eh_stmt.  Avoid optimization if stmt has EH
+       edges, but gimple_fold_builtin result can't throw.
+
 2011-12-13  Jakub Jelinek  <jakub@redhat.com>
            Michael Matz  <matz@suse.de>
 
index 4afced899a0a3fdde99478b35a2806b25c379d28..91dd8fc589245bf22ea9731fef117a8664ac5408 100644 (file)
@@ -1117,21 +1117,10 @@ gimple_fold_call (gimple_stmt_iterator *gsi, bool inplace)
   if (callee && DECL_BUILT_IN (callee))
     {
       tree result = gimple_fold_builtin (stmt);
-      if (result
-         /* Disallow EH edge removal here.  We can't call
-            gimple_purge_dead_eh_edges here.  */
-         && (lookup_stmt_eh_lp (stmt) == 0
-             || tree_could_throw_p (result)))
+      if (result)
        {
           if (!update_call_from_tree (gsi, result))
            gimplify_and_update_call_from_tree (gsi, result);
-         if (!gsi_end_p (*gsi))
-           {
-             gimple new_stmt = gsi_stmt (*gsi);
-             bool update_eh ATTRIBUTE_UNUSED
-               = maybe_clean_or_replace_eh_stmt (stmt, new_stmt);
-             gcc_assert (!update_eh);
-           }
          changed = true;
        }
     }