From: Eric Botcazou <ebotcazou@adacore.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Fix combiner ICEs after my recent patch (PR rtl-optimization/48549)
Date: Tue, 12 Apr 2011 08:35:00 -0000 [thread overview]
Message-ID: <201104121029.57672.ebotcazou@adacore.com> (raw)
In-Reply-To: <20110412080647.GC17079@tyan-ft48-01.lab.bos.redhat.com>
> That is because propagate_for_debug stops at the insn before last, doesn't
> process last any longer. So, if there is a DEBUG_INSN right before the
> jump being deleted, and it has been propagated into, after the jump is
> deleted and retry is done at i2 earlier, following propagate_for_debug
> won't see that DEBUG_INSN any longer.
Ah, yes, thanks.
> We could certainly change propagate_for_debug, so that it would stop either
> before end (NEXT_INSN (BB_END (this_basic_block)) added in this patch), or
> after processing last (which doesn't change anything in the non-deleted
> insn case, because i3 from any try_combine surely isn't a DEBUG_INSN and
> propagate_for_debug only propagates into those), then on deletion set it to
> PREV_INSN instead of NEXT_INSN. I wonder whether we couldn't be deleting
> the first insn in a basic block, but probably there should be at least a
> note before it.
This looks fine to me.
> Perhaps instead of the assert we could in that case just set
> last_combined_insn to insn.
Yes, this looks preferable to me, IMO we don't need to stop the compiler when
something goes wrong with debug insns.
> 2011-04-12 Jakub Jelinek <jakub@redhat.com>
>
> PR rtl-optimization/48549
> * combine.c (propagate_for_debug): Also stop after BB_END of
> this_basic_block. Process LAST and just stop processing after it.
> (combine_instructions): If last_combined_insn has been deleted,
> set last_combined_insn to its PREV_INSN.
>
> * g++.dg/opt/pr48549.C: New test.
So OK modulo the last point, thanks.
--
Eric Botcazou
next prev parent reply other threads:[~2011-04-12 8:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-11 10:50 Jakub Jelinek
2011-04-12 7:23 ` Eric Botcazou
2011-04-12 8:07 ` Jakub Jelinek
2011-04-12 8:35 ` Eric Botcazou [this message]
2011-04-12 10:55 ` Jakub Jelinek
2011-04-12 17:09 ` [PATCH] Don't update_cfg_for_uncondjump for noop non-jump moves Jakub Jelinek
2011-04-12 17:12 ` Jeff Law
2011-04-12 17:31 ` Eric Botcazou
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=201104121029.57672.ebotcazou@adacore.com \
--to=ebotcazou@adacore.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).