linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christopher Li <sparse@chrisli.org>
To: "Jan Pokorný" <pokorny_jan@seznam.cz>
Cc: linux-sparse@vger.kernel.org
Subject: Re: [PATCH 2/2] better dealing with OP_PHISOURCE insn
Date: Thu, 14 Apr 2011 03:10:15 -0700	[thread overview]
Message-ID: <BANLkTimoNvYiGCaBo7N4+j=B_WJ4dUNrug@mail.gmail.com> (raw)
In-Reply-To: <4DA04D3B.1010309@seznam.cz>

On Sat, Apr 9, 2011 at 5:12 AM, Jan Pokorný <pokorny_jan@seznam.cz> wrote:
> -               if (def->opcode == OP_PHI) {
> -                       phi_defines(def, target, defines);
> -                       continue;
> -               }
> -               defines(def->bb, phi->def, target);
> +               /* if this ever fails (very unlikely), it's a sign of a regression */
> +               assert(def->opcode == OP_PHISOURCE);
> +               defines(def->bb, def, target);
>        } END_FOR_EACH_PTR(phi);

That comment usually means there is some thing fishy going on there.
I think you are on to some thing. The original code mean to recursively
define all the phi source, if the phi source is come from another phi node.
But the original code seems wrong. It should lookat def->phi_src->def->opcode
instead of def->opcode. I don't think we should remove the phi_defines there.
I need to double check this as well.

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2011-04-14 10:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-09 11:53 [PATCH 1/2] better dealing with OP_PHISOURCE insn Jan Pokorný
2011-04-09 12:07 ` [PATCH 2/2] " Jan Pokorný
2011-04-09 12:12   ` Jan Pokorný
2011-04-14 10:10     ` Christopher Li [this message]
2011-04-15 22:52   ` Jan Pokorný
2011-04-16 10:56     ` Jan Pokorný
2011-04-16 11:16       ` Jan Pokorný
2011-04-16 14:49         ` Jan Pokorný
2011-04-16 16:21         ` Jan Pokorný

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='BANLkTimoNvYiGCaBo7N4+j=B_WJ4dUNrug@mail.gmail.com' \
    --to=sparse@chrisli.org \
    --cc=linux-sparse@vger.kernel.org \
    --cc=pokorny_jan@seznam.cz \
    /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 NNTP newsgroup(s).