public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Martin Sebor <msebor@gmail.com>
Cc: Richard Biener <rguenther@suse.de>,
	Jeff Law <jeffreyalaw@gmail.com>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] call mark_dfs_back_edges() before testing EDGE_DFS_BACK [PR104761]
Date: Fri, 4 Mar 2022 14:58:37 +0100	[thread overview]
Message-ID: <YiIbDRI5G0g9lx7E@tucnak> (raw)
In-Reply-To: <3a1b2fc6-a21a-14e4-c34f-b8b0c311d35f@gmail.com>

On Thu, Mar 03, 2022 at 05:08:30PM -0700, Martin Sebor wrote:
> > 1) shouldn't it give up for EDGE_ABNORMAL too?  I mean, e.g.
> >     following a non-local goto forced edge from a noreturn call
> >     to a non-local label (if there is just one) doesn't seem
> >     right to me
> 
> Possibly yes.  I can add it but I don't have a lot of experience with
> these bits so if you can suggest a test case to exercise this that
> would be helpful.

Something like:
void
foo (void)
{
  __label__ l;
  __attribute__((noreturn)) void bar (int x) { if (x) goto l; __builtin_trap (); }
  bar (0);
l:;
}
shows a single EDGE_ABNORMAL from the bar call.
But it would need tweaking for the ptr use and clobber.

> > 2) if EDGE_DFS_BACK is computed and 1) is done, is there any
> >     reason why you need 2 levels of protection, i.e. the EDGE_DFS_BACK
> >     check as well as the visited bitmap (and having them use
> >     very different answers, if EDGE_DFS_BACK is seen, the function
> >     will return false, if visited bitmap has a bb, it will return true)?
> >     Can't the visited bitmap go away?
> 
> Possibly.  As I said above, I don't have enough experience with these
> bits to make (and test) the changes quickly, or enough bandwidth to
> come up to speed on them.  Please feel free to make these improvements.

I'll change that if it passes testing.

	Jakub


  reply	other threads:[~2022-03-04 13:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-02 23:15 Martin Sebor
2022-03-03  8:01 ` Jakub Jelinek
2022-03-03  9:26   ` Richard Biener
2022-03-03 17:56   ` Jeff Law
2022-03-04  0:08   ` Martin Sebor
2022-03-04 13:58     ` Jakub Jelinek [this message]
2022-03-05  8:08       ` [PATCH] waccess: Remove visited bitmap and stop on EDGE_ABNORMAL Jakub Jelinek
2022-03-05 10:28         ` Richard Biener
2022-03-10 14:17 ` [PATCH] call mark_dfs_back_edges() before testing EDGE_DFS_BACK [PR104761] Jason Merrill

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=YiIbDRI5G0g9lx7E@tucnak \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    --cc=msebor@gmail.com \
    --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).