public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "steven at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/56921] [4.9 Regression] ICE in rtx_cost called by doloop_optimize_loops for PPC
Date: Fri, 12 Apr 2013 08:36:00 -0000	[thread overview]
Message-ID: <bug-56921-4-vuUBkx4UPs@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-56921-4@http.gcc.gnu.org/bugzilla/>


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.


  parent reply	other threads:[~2013-04-12  8:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-11 15:39 [Bug rtl-optimization/56921] New: [4.8 Regression] ICE in rtx_cost dje at gcc dot gnu.org
2013-04-11 15:43 ` [Bug rtl-optimization/56921] [4.8 Regression] ICE in rtx_cost called by doloop_optimize_loops for PPC dje at gcc dot gnu.org
2013-04-11 17:54 ` pthaugen at gcc dot gnu.org
2013-04-11 19:11 ` jakub at gcc dot gnu.org
2013-04-11 20:02 ` pthaugen at gcc dot gnu.org
2013-04-11 21:03 ` [Bug rtl-optimization/56921] [4.9 " pthaugen at gcc dot gnu.org
2013-04-11 22:15 ` steven at gcc dot gnu.org
2013-04-12  7:46 ` rguenth at gcc dot gnu.org
2013-04-12  8:36 ` steven at gcc dot gnu.org [this message]
2013-04-12  8:45 ` rguenther at suse dot de
2013-04-14 23:54 ` pinskia at gcc dot gnu.org
2013-04-15 14:46 ` rguenth at gcc dot gnu.org
2013-04-15 15:26 ` ktkachov at gcc dot gnu.org
2013-04-16 13:40 ` krebbel at gcc dot gnu.org
2013-04-17 12:02 ` rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-56921-4-vuUBkx4UPs@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).