From: Jeff Law <law@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Fix dom ICE (PR tree-optimization/55329)
Date: Fri, 16 Nov 2012 19:37:00 -0000 [thread overview]
Message-ID: <50A695F3.2070904@redhat.com> (raw)
In-Reply-To: <20121115201415.GD1886@tucnak.redhat.com>
On 11/15/2012 01:14 PM, Jakub Jelinek wrote:
> Hi!
>
> On the following testcase we ICE, because tree_ssa_dominator_optimize
> modifies the bitmap while iterating it. In particular, it contained just
> a single bit in it, bitmap_clear_bit turned the bitmap into empty bitmap and
> bitmap_set_bit on a lower bit reused the same bitmap_element with lower
> index, but higher bit set in it, therefore EXECUTE_IF_SET_IN_BITMAP in next
> iteration gave bit above highest basic block.
>
> Fixed by never clearing any bits from the bitmap while traversing it,
> it isn't IMHO a big deal, gimple_purge_all_dead_eh_edges will in a few
> insns find out the forwarder block doesn't have any EDGE_EH edges and will
> do nothing for it, on the other side to handle even chained forwarder blocks
> it loops to find the last one. Insertion of bits looks safe to me, we don't
> care if those inserted bits are processed again or not (nothing will be done
> for them anymore).
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
>
> 2012-11-15 Jakub Jelinek <jakub@redhat.com>
>
> PR tree-optimization/55329
> * tree-ssa-dom.c (tree_ssa_dominator_optimize): Never clear
> bits in needed_eh_cleanup while iterating over the bitmap.
> Look through all forwarder blocks at once.
>
> * g++.dg/opt/pr55329.C: New test.
This is fine.
I've still got a todo on my list from 2009 to have checking code to
detect when a bitmap is changing while we're iterating on it.
jeff
prev parent reply other threads:[~2012-11-16 19:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-15 20:14 Jakub Jelinek
2012-11-16 19:37 ` Jeff Law [this message]
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=50A695F3.2070904@redhat.com \
--to=law@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@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).