aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@gcc.gnu.org>2012-02-15 00:10:00 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2012-02-15 00:10:00 +0000
commitaa47290b049146ff769c0a574e0d4d44930e209e (patch)
tree18ec09d90fb77ac0d3f7100b09c78c6700285cec /gcc
parente73bea1cebabe2e142bfb84adbbc469a3334c65e (diff)
downloadgcc-aa47290b049146ff769c0a574e0d4d44930e209e.zip
gcc-aa47290b049146ff769c0a574e0d4d44930e209e.tar.gz
gcc-aa47290b049146ff769c0a574e0d4d44930e209e.tar.bz2
re PR lto/52178 (Ada bootstrap failure in LTO mode)
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. From-SVN: r184246
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/gimple.c8
-rw-r--r--gcc/tree-ssa-pre.c23
3 files changed, 22 insertions, 19 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1536017..f7f2169 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/gimple.c b/gcc/gimple.c
index 9a6ed67..805ad2d 100644
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -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;
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 71f945f..e5ec931 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -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 ();
}