This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] tree-ssa-sink.c: Don't restrict immediate uses that weconsider.
- From: Andrew MacLeod <amacleod at redhat dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Kazu Hirata <kazu at cs dot umass dot edu>, gcc-patches <gcc-patches at gcc dot gnu dot org>, Daniel Berlin <dberlin at dberlin dot org>
- Date: Thu, 07 Apr 2005 14:54:28 -0400
- Subject: Re: [patch] tree-ssa-sink.c: Don't restrict immediate uses that weconsider.
- References: <20050407.103723.133895356.kazu@cs.umass.edu> <1112895827.13749.157.camel@localhost.localdomain>
On Thu, 2005-04-07 at 13:43, Jeffrey A Law wrote:
> On Thu, 2005-04-07 at 10:37 -0400, Kazu Hirata wrote:
> > Hi,
> >
> > 2005-04-07 Kazu Hirata <kazu@cs.umass.edu>
> >
> > * tree-ssa-sink.c (nearest_common_dominator_of_uses): Consider
> > all immediate uses in PHI nodes.
> It seems to me that you're really just removing a test that should
> always be true. Right? ie, if we have an immediate use which points
> to a phi argument, then well, the object in question better appear in
> that phi argument, or else something horribly wrong has happened.
>
> Thus we really might consider either checking this as part of our
> standard IL verification (who knows, with Andrew's work we might already
> have this check) or we can just turn the IF statement into a gcc_assert.
if you use PHI_ARG_INDEX_FROM_USE (use_p), there is an assert that the
use_p is indeed a phi argument.
Andrew