public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Steven Bosscher <stevenb.gcc@gmail.com>
To: Aldy Hernandez <aldyh@redhat.com>
Cc: "Vladimir N. Makarov" <vmakarov@redhat.com>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PR rtl-optimization/55604]: fix ICE in remove_some_program_points_and_update_live_ranges
Date: Wed, 05 Dec 2012 18:26:00 -0000	[thread overview]
Message-ID: <CABu31nPxY_hOXqCx8Cm9WWeuacJveLY8t8nyf_B5CFEib7a5BA@mail.gmail.com> (raw)
In-Reply-To: <50BF8ECF.4010804@redhat.com>

On Wed, Dec 5, 2012 at 7:13 PM, Aldy Hernandez wrote:
> This is a division by zero ICE.
>
> In the testcase in the PR, both `n' and `lra_live_max_point' are zero. I
> have opted to inhibit the dump when lra_live_max_point is zero, but I can
> just as easily avoiding printing the percentage in this case.

Test case?

Also, it'd be preferable if you can also update
remove_some_program_points_and_update_live_ranges in ira-lives.c -- it
seems to me that at some point we're going to want to merge the almost
identical functions from LRA and IRA but that gets harder if they
start diverging.

> Let me know what you prefer.

How can you end up with lra_live_max_point==0? AFAIU that can only
happen if you have no live ranges at all (no program points) or if
somehow the curr_point counter got messed up. The former case would
mean you shouldn't end up calling
remove_some_program_points_and_update_live_ranges to begin with (no
program points being there to remove), the latter case would be a bug.

I don't think this is the correct fix.

Ciao!
Steven

  parent reply	other threads:[~2012-12-05 18:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-05 18:13 Aldy Hernandez
2012-12-05 18:25 ` Aldy Hernandez
2012-12-05 18:26 ` Steven Bosscher [this message]
2012-12-05 18:48 ` Vladimir Makarov
2012-12-05 19:11   ` Steven Bosscher
2012-12-05 19:15     ` Steven Bosscher
2012-12-05 19:33     ` Vladimir Makarov
2012-12-05 20:47       ` Aldy Hernandez
2012-12-05 23:58         ` Steven Bosscher
2012-12-05 19:36 David Edelsohn

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=CABu31nPxY_hOXqCx8Cm9WWeuacJveLY8t8nyf_B5CFEib7a5BA@mail.gmail.com \
    --to=stevenb.gcc@gmail.com \
    --cc=aldyh@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=vmakarov@redhat.com \
    /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).