OSDN Git Service

PR lto/52178
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Feb 2012 00:10:00 +0000 (00:10 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Feb 2012 00:10:00 +0000 (00:10 +0000)
* gimple.c (iterative_hash_gimple_type): Use RECORD_OR_UNION_TYPE_P.
(iterative_hash_canonical_type): Likewise.
* tree-ssa-pre.c (fini_pre): Clean up the CFG only after purging all
the dead edges.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184246 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/gimple.c
gcc/tree-ssa-pre.c

index 1536017..f7f2169 100644 (file)
@@ -1,4 +1,12 @@
-2012-02-15  Bernd Schmidt  <bernds@codesourcery.com>
+2012-02-14  Eric Botcazou  <ebotcazou@adacore.com>
+
+       PR lto/52178
+       * gimple.c (iterative_hash_gimple_type): Use RECORD_OR_UNION_TYPE_P.
+       (iterative_hash_canonical_type): Likewise.
+       * tree-ssa-pre.c (fini_pre): Clean up the CFG only after purging all
+       the dead edges.
+
+2012-02-14  Bernd Schmidt  <bernds@codesourcery.com>
 
        * haifa-sched.c (prune_ready_list): Ensure that if there is a
        sched-group insn, it either remains alone or the entire list is
index 9a6ed67..805ad2d 100644 (file)
@@ -4140,9 +4140,7 @@ iterative_hash_gimple_type (tree type, hashval_t val,
       v = iterative_hash_hashval_t (na, v);
     }
 
-  if (TREE_CODE (type) == RECORD_TYPE
-      || TREE_CODE (type) == UNION_TYPE
-      || TREE_CODE (type) == QUAL_UNION_TYPE)
+  if (RECORD_OR_UNION_TYPE_P (type))
     {
       unsigned nf;
       tree f;
@@ -4373,9 +4371,7 @@ iterative_hash_canonical_type (tree type, hashval_t val)
       v = iterative_hash_hashval_t (na, v);
     }
 
-  if (TREE_CODE (type) == RECORD_TYPE
-      || TREE_CODE (type) == UNION_TYPE
-      || TREE_CODE (type) == QUAL_UNION_TYPE)
+  if (RECORD_OR_UNION_TYPE_P (type))
     {
       unsigned nf;
       tree f;
index 71f945f..e5ec931 100644 (file)
@@ -4836,6 +4836,9 @@ init_pre (bool do_fre)
 static void
 fini_pre (bool do_fre)
 {
+  bool do_eh_cleanup = !bitmap_empty_p (need_eh_cleanup);
+  bool do_ab_cleanup = !bitmap_empty_p (need_ab_cleanup);
+
   free (postorder);
   VEC_free (bitmap_set_t, heap, value_expressions);
   BITMAP_FREE (inserted_exprs);
@@ -4851,22 +4854,18 @@ fini_pre (bool do_fre)
 
   free_dominance_info (CDI_POST_DOMINATORS);
 
-  if (!bitmap_empty_p (need_eh_cleanup))
-    {
-      gimple_purge_all_dead_eh_edges (need_eh_cleanup);
-      cleanup_tree_cfg ();
-    }
+  if (do_eh_cleanup)
+    gimple_purge_all_dead_eh_edges (need_eh_cleanup);
 
-  BITMAP_FREE (need_eh_cleanup);
-
-  if (!bitmap_empty_p (need_ab_cleanup))
-    {
-      gimple_purge_all_dead_abnormal_call_edges (need_ab_cleanup);
-      cleanup_tree_cfg ();
-    }
+  if (do_ab_cleanup)
+    gimple_purge_all_dead_abnormal_call_edges (need_ab_cleanup);
 
+  BITMAP_FREE (need_eh_cleanup);
   BITMAP_FREE (need_ab_cleanup);
 
+  if (do_eh_cleanup || do_ab_cleanup)
+    cleanup_tree_cfg ();
+
   if (!do_fre)
     loop_optimizer_finalize ();
 }