aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-threadupdate.c
diff options
context:
space:
mode:
authorZdenek Dvorak <dvorakz@suse.cz>2007-05-24 16:02:12 +0200
committerZdenek Dvorak <rakdver@gcc.gnu.org>2007-05-24 14:02:12 +0000
commit561e8a90fdfe45ef935dbb16c6cf0389f2e7fef1 (patch)
tree9bb72d30323dfced6a574b1c6fc4064792090034 /gcc/tree-ssa-threadupdate.c
parent66da42bc85b1004d6ad17b514673a9eea6fa0eb2 (diff)
downloadgcc-561e8a90fdfe45ef935dbb16c6cf0389f2e7fef1.zip
gcc-561e8a90fdfe45ef935dbb16c6cf0389f2e7fef1.tar.gz
gcc-561e8a90fdfe45ef935dbb16c6cf0389f2e7fef1.tar.bz2
re PR middle-end/32018 (ICE on optimization)
PR middle-end/32018 * tree-ssa-threadupdate.c (thread_through_loop_header): Use set_loop_copy. (thread_through_all_blocks): Call initialize_original_copy_tables and free_original_copy_tables. * cfgloopmanip.c (duplicate_loop, duplicate_loop_to_header_edge): Use set_loop_copy. * tree-cfg.c (tree_duplicate_sese_region): Ditto. * cfghooks.c (duplicate_block): Use get_loop_copy. * cfg.c: Include cfgloop.h. (loop_copy): New hash table. (initialize_original_copy_tables): Initialize loop_copy table. (free_original_copy_tables): Free loop_copy table. (copy_original_table_clear, copy_original_table_set, set_loop_copy, get_loop_copy): New functions. (set_bb_original, set_bb_copy): Use copy_original_table_set. * cfgloop.h (struct loop): Remove copy field. * Makefile.in (cfg.o): Add CFGLOOP_H dependency. * basic-block.h (set_loop_copy, get_loop_copy): Declare. From-SVN: r125024
Diffstat (limited to 'gcc/tree-ssa-threadupdate.c')
-rw-r--r--gcc/tree-ssa-threadupdate.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c
index 22266bd..6732f2e 100644
--- a/gcc/tree-ssa-threadupdate.c
+++ b/gcc/tree-ssa-threadupdate.c
@@ -918,10 +918,10 @@ thread_through_loop_header (struct loop *loop, bool may_peel_loop_headers)
/* The duplicate of the header is the new preheader of the loop. Ensure
that it is placed correctly in the loop hierarchy. */
- loop->copy = loop_outer (loop);
+ set_loop_copy (loop, loop_outer (loop));
thread_block (header, false);
- loop->copy = NULL;
+ set_loop_copy (loop, NULL);
new_preheader = e->dest;
/* Create the new latch block. This is always necessary, as the latch
@@ -1031,9 +1031,7 @@ thread_through_all_blocks (bool may_peel_loop_headers)
mark_threaded_blocks (threaded_blocks);
- if (current_loops)
- FOR_EACH_LOOP (li, loop, LI_FROM_INNERMOST)
- loop->copy = NULL;
+ initialize_original_copy_tables ();
/* First perform the threading requests that do not affect
loop structure. */
@@ -1067,6 +1065,8 @@ thread_through_all_blocks (bool may_peel_loop_headers)
fprintf (dump_file, "\nJumps threaded: %lu\n",
thread_stats.num_threaded_edges);
+ free_original_copy_tables ();
+
BITMAP_FREE (threaded_blocks);
threaded_blocks = NULL;
VEC_free (edge, heap, threaded_edges);