This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] PR21639 fix
- From: Dorit Naishlos <DORIT at il dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 26 May 2005 15:01:30 +0300
- Subject: [patch] PR21639 fix
- Reply-to:
- Sensitivity:
The "scalar_evolution_info" hash-table gets corrupted during pass
'lower_vector_ssa'. What happens is that during vectorization analysis new
entries in the hash-table are created, but the call to ggc_collect in the
subsequent pass 'lower_vector_ssa' frees up this data. Later on
complete-loop-unroll ICEs when using the data in the hash-table. This
happens because:
>there are several places in loop opts that are not GGC-safe (in
>particular the tree nodes refered from loop structures are not
>seen by garbage collector, and I think there are some other instances).
>
>So at the moment, you cannot run ggc_collect inside loop opts.
(as pointed out by Zdenek in
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21639).
The simplest thing to do until loop optimizations are made GGC-safe is to
remove the call to ggc_collect from pass_lower_vector.
This patch also fixes an ICE (segmentation fault) in SPEC's gap and mesa.
Bootstrapped and tested on powerpc-apple-darwin.
ok to install?
thanks,
dorit
Changelog:
* tree-complex.c (pass_lower_vector_s): Remove TODO_ggc_collect.
Patch:
Index: tree-complex.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-complex.c,v
retrieving revision 2.24
diff -c -3 -p -r2.24 tree-complex.c
*** tree-complex.c 27 Apr 2005 16:50:14 -0000 2.24
--- tree-complex.c 25 May 2005 15:48:18 -0000
*************** struct tree_opt_pass pass_lower_vector_s
*** 1051,1057 ****
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_dump_func | TODO_update_ssa /* todo_flags_finish */
! | TODO_ggc_collect | TODO_verify_ssa
| TODO_verify_stmts | TODO_verify_flow,
0 /* letter */
};
--- 1051,1057 ----
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_dump_func | TODO_update_ssa /* todo_flags_finish */
! | TODO_verify_ssa
| TODO_verify_stmts | TODO_verify_flow,
0 /* letter */
};