public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Richard Biener <rguenther@suse.de>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] tree-optimization/109524 - ICE with VRP edge removal
Date: Mon, 17 Apr 2023 10:47:01 +0200	[thread overview]
Message-ID: <ZD0HhXPH/UwKDg+3@tucnak> (raw)
In-Reply-To: <39683.123041704413900324@us-mta-593.us.mimecast.lan>

On Mon, Apr 17, 2023 at 08:41:38AM +0000, Richard Biener wrote:
> VRP queues edges to process late for updating global ranges for
> __builtin_unreachable.  But this interferes with edge removal
> from substitute_and_fold.  The following deals with this by
> looking up the edge with source/dest block indices which do not
> become stale.
> 
> For GCC 14 we probably want to refactor substitute_and_fold but
> that doesn't seem appropriate at this stage.
> 
> Bootstrapped and tested on x86_64-unknown-linux-gnu, OK?
> 
> Thanks,
> Richard.
> 
> 	PR tree-optimization/109524
> 	* tree-vrp.cc (remove_unreachable::m_list): Change to a
> 	vector of pairs of block indices.
> 	(remove_unreachable::maybe_register_block): Adjust.
> 	(remove_unreachable::remove_and_update_globals): Likewise.
> 	Deal with removed blocks.
> 
> 	* g++.dg/pr109524.C: New testcase.

Ok, thanks.
> --- a/gcc/tree-vrp.cc
> +++ b/gcc/tree-vrp.cc
> @@ -75,7 +75,7 @@ public:
>    ~remove_unreachable () { m_list.release (); }
>    void maybe_register_block (basic_block bb);
>    bool remove_and_update_globals (bool final_p);
> -  vec<edge> m_list;
> +  vec<std::pair<int, int> > m_list;

We are in C++11, you could use >> instead of > > here I think.

	Jakub


       reply	other threads:[~2023-04-17  8:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <39683.123041704413900324@us-mta-593.us.mimecast.lan>
2023-04-17  8:47 ` Jakub Jelinek [this message]
2023-04-17  8:41 Richard Biener

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=ZD0HhXPH/UwKDg+3@tucnak \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rguenther@suse.de \
    /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).