[Bug rtl-optimization/56921] [4.9 Regression] ICE in rtx_cost called by doloop_optimize_loops for PPC
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56921 Richard Biener rguenth at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Comment #15 from Richard Biener rguenth at gcc dot gnu.org 2013-04-17 12:02:05 UTC --- Author: rguenth Date: Wed Apr 17 12:01:46 2013 New Revision: 198025 URL: http://gcc.gnu.org/viewcvs?rev=198025root=gccview=rev Log: 2013-04-17 Richard Biener rguent...@suse.de PR rtl-optimization/56921 * cfgloop.h (struct loop): Add simple_loop_desc member. (struct niter_desc): Mark with GTY(()). (simple_loop_desc): Do not use aux field but simple_loop_desc. * loop-iv.c (get_simple_loop_desc): Likewise. (free_simple_loop_desc): Likewise. Revert 2013-04-16 Richard Biener rguent...@suse.de PR rtl-optimization/56921 * loop-init.c (pass_rtl_move_loop_invariants): Add TODO_do_not_ggc_collect to todo_flags_finish. (pass_rtl_unswitch): Same. (pass_rtl_unroll_and_peel_loops): Same. (pass_rtl_doloop): Same. Modified: trunk/gcc/ChangeLog trunk/gcc/cfgloop.h trunk/gcc/loop-init.c trunk/gcc/loop-iv.c
[Bug rtl-optimization/56921] [4.9 Regression] ICE in rtx_cost called by doloop_optimize_loops for PPC
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56921 Andreas Krebbel krebbel at gcc dot gnu.org changed: What|Removed |Added CC||krebbel at gcc dot gnu.org --- Comment #14 from Andreas Krebbel krebbel at gcc dot gnu.org 2013-04-16 13:40:27 UTC --- *** Bug 56978 has been marked as a duplicate of this bug. ***
[Bug rtl-optimization/56921] [4.9 Regression] ICE in rtx_cost called by doloop_optimize_loops for PPC
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56921 --- Comment #11 from Richard Biener rguenth at gcc dot gnu.org 2013-04-15 14:46:49 UTC --- Created attachment 29877 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=29877 patch papering over the issue with TODO_do_not_ggc_collect Patch papering over (restoring non-GC collect) attached. Not exactly the best solution as garbage is then again not collected during the in some cases memory expensive passes.
[Bug rtl-optimization/56921] [4.9 Regression] ICE in rtx_cost called by doloop_optimize_loops for PPC
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56921 --- Comment #12 from ktkachov at gcc dot gnu.org 2013-04-15 15:26:10 UTC --- (In reply to comment #11) Created attachment 29877 [details] patch papering over the issue with TODO_do_not_ggc_collect Patch papering over (restoring non-GC collect) attached. Not exactly the best solution as garbage is then again not collected during the in some cases memory expensive passes. Fixes ICE while building libgfortran for arm-*-*. Also, no regressions on arm-none-eabi tested with qemu.
[Bug rtl-optimization/56921] [4.9 Regression] ICE in rtx_cost called by doloop_optimize_loops for PPC
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56921 --- Comment #13 from Pat Haugen pthaugen at gcc dot gnu.org 2013-04-15 19:37:27 UTC --- (In reply to comment #12) (In reply to comment #11) Created attachment 29877 [details] patch papering over the issue with TODO_do_not_ggc_collect Patch papering over (restoring non-GC collect) attached. Not exactly the best solution as garbage is then again not collected during the in some cases memory expensive passes. Fixes ICE while building libgfortran for arm-*-*. Also, no regressions on arm-none-eabi tested with qemu. This also fixes the testsuite failures and numerous spec build failures on powerpc.
[Bug rtl-optimization/56921] [4.9 Regression] ICE in rtx_cost called by doloop_optimize_loops for PPC
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56921 Andrew Pinski pinskia at gcc dot gnu.org changed: What|Removed |Added CC||ktkachov at gcc dot gnu.org --- Comment #10 from Andrew Pinski pinskia at gcc dot gnu.org 2013-04-14 23:54:11 UTC --- *** Bug 56916 has been marked as a duplicate of this bug. ***
[Bug rtl-optimization/56921] [4.9 Regression] ICE in rtx_cost called by doloop_optimize_loops for PPC
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56921 Richard Biener rguenth at gcc dot gnu.org changed: What|Removed |Added Target Milestone|--- |4.9.0 --- Comment #7 from Richard Biener rguenth at gcc dot gnu.org 2013-04-12 07:46:01 UTC --- niter_desc is not marked GTY(()) but is cached from struct loop aux field. niter_desc uses heap memory but points to GC memory. Thus, caching of this across passes is not safe. I suppose passes are missing free_simple_loop_desc, loop-doloop.c calls get_simple_loop_desc but never free_simple_loop_desc for example (which then at least leaks the niter_desc memory).
[Bug rtl-optimization/56921] [4.9 Regression] ICE in rtx_cost called by doloop_optimize_loops for PPC
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56921 --- Comment #8 from Steven Bosscher steven at gcc dot gnu.org 2013-04-12 08:36:04 UTC --- (In reply to comment #7) niter_desc is not marked GTY(()) but is cached from struct loop aux field. niter_desc uses heap memory but points to GC memory. Thus, caching of this across passes is not safe. I suppose passes are missing free_simple_loop_desc, loop-doloop.c calls get_simple_loop_desc but never free_simple_loop_desc for example (which then at least leaks the niter_desc memory). Another, IMHO better, solution would be to not use loop-aux but make a GC-safe vec indexed by loop-num. Maybe add checking in the loop verifier that no struct niter_desc is left pending if its parent loop is removed. That should make the loop passes GC safe. Then mark all aux fields as GC unsafe and document that every pass is responsible for cleaning up after itself.
[Bug rtl-optimization/56921] [4.9 Regression] ICE in rtx_cost called by doloop_optimize_loops for PPC
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56921 --- Comment #9 from rguenther at suse dot de rguenther at suse dot de 2013-04-12 08:45:46 UTC --- On Fri, 12 Apr 2013, steven at gcc dot gnu.org wrote: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56921 --- Comment #8 from Steven Bosscher steven at gcc dot gnu.org 2013-04-12 08:36:04 UTC --- (In reply to comment #7) niter_desc is not marked GTY(()) but is cached from struct loop aux field. niter_desc uses heap memory but points to GC memory. Thus, caching of this across passes is not safe. I suppose passes are missing free_simple_loop_desc, loop-doloop.c calls get_simple_loop_desc but never free_simple_loop_desc for example (which then at least leaks the niter_desc memory). Another, IMHO better, solution would be to not use loop-aux but make a GC-safe vec indexed by loop-num. Maybe add checking in the loop verifier that no struct niter_desc is left pending if its parent loop is removed. That should make the loop passes GC safe. Then mark all aux fields as GC unsafe and document that every pass is responsible for cleaning up after itself. Yes, definitely. I was bit once by this -aux usage which is not really obvious. Richard.
[Bug rtl-optimization/56921] [4.9 Regression] ICE in rtx_cost called by doloop_optimize_loops for PPC
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56921 --- Comment #5 from Pat Haugen pthaugen at gcc dot gnu.org 2013-04-11 21:03:50 UTC --- As are these forran failures also: FAIL: gfortran.dg/minloc_3.f90 -O3 -fomit-frame-pointer -funroll-loops (internal compiler error) FAIL: gfortran.dg/minlocval_3.f90 -O3 -fomit-frame-pointer -funroll-loops (internal compiler error)
[Bug rtl-optimization/56921] [4.9 Regression] ICE in rtx_cost called by doloop_optimize_loops for PPC
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56921 Steven Bosscher steven at gcc dot gnu.org changed: What|Removed |Added CC||steven at gcc dot gnu.org --- Comment #6 from Steven Bosscher steven at gcc dot gnu.org 2013-04-11 22:15:26 UTC --- Shot from the hip: struct niter_desc is not GC safe.