public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/56426] [4.8 Regression] Segmentation fault in find_var_scev_info, at tree-scalar-evolution.c:358
Date: Mon, 25 Feb 2013 12:15:00 -0000	[thread overview]
Message-ID: <bug-56426-4-dryhJ0d0HX@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-56426-4@http.gcc.gnu.org/bugzilla/>


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56426

--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> 2013-02-25 12:15:05 UTC ---
Goes away with -fno-tree-pre.  The thing is, PRE calls scev_finalize.  But
before loop optimizing, especially estimate_numbers_of_iterations, which calls
estimate_numbers_of_iterations_loop, SCEV should be initialized.  Or at least
estimate_numbers_of_iterations_loop should be guarded by if (scev_initialized_p
()) as on other places.  SCEV is normally initialized in tree_ssa_loop_init,
but only if number_of_loops > 1.

  if (number_of_loops () <= 1)
    return 0;

  scev_initialize ();

Would it make sense to always initialize SCEV, i.e.:
--- gcc/tree-ssa-loop.c.mp      2013-02-25 13:06:47.212132327 +0100
+++ gcc/tree-ssa-loop.c 2013-02-25 13:06:50.148141586 +0100
@@ -70,10 +70,11 @@ tree_ssa_loop_init (void)
                       | LOOPS_HAVE_RECORDED_EXITS);
   rewrite_into_loop_closed_ssa (NULL, TODO_update_ssa);

+  scev_initialize ();
+
   if (number_of_loops () <= 1)
     return 0;

-  scev_initialize ();
   return 0;
 }
?


  parent reply	other threads:[~2013-02-25 12:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-22 14:52 [Bug tree-optimization/56426] New: " antoine.balestrat at gmail dot com
2013-02-22 15:50 ` [Bug tree-optimization/56426] [4.8 Regression] " mpolacek at gcc dot gnu.org
2013-02-25  8:45 ` rguenth at gcc dot gnu.org
2013-02-25 10:58 ` mpolacek at gcc dot gnu.org
2013-02-25 12:15 ` mpolacek at gcc dot gnu.org [this message]
2013-02-25 12:50 ` rguenth at gcc dot gnu.org
2013-02-25 14:07 ` mpolacek at gcc dot gnu.org
2013-02-26 11:07 ` mpolacek at gcc dot gnu.org
2013-02-26 11:08 ` mpolacek 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-56426-4-dryhJ0d0HX@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).