This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: How to check that two ssa registers have the same symbolic value
- From: Victor Kaplansky <VICTORK at il dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: "Daniel Berlin" <dberlin at dberlin dot org>, law at redhat dot com, dvorakz at suse dot cz, rakdver at kam dot mff dot cuni dot cz
- Date: Wed, 30 May 2007 10:24:55 +0300
- Subject: Re: How to check that two ssa registers have the same symbolic value
"Daniel Berlin" <dberlin@dberlin.org> wrote on 29.05.2007 18:35:49:
> On 5/29/07, Victor Kaplansky <VICTORK@il.ibm.com> wrote:
> >
> > Hello,
> >
> > I'm working on a pass performing store-sinking
> > as in following example:
> >
> > if (c)
> > p[i] = x;
> > else
> > p[i] = y;
> >
> > The idea is to perform store sinking:
> >
> > if (c)
> > tmp = x;
> > else
> > tmp = y;
> >
> > a[i] = tmp;
> >
> > The objective is to help if-convert pass to get rid of conditional
> > branches, which can be very expansive on some architectures.
> >
> You should extend tree-ssa-sink to do this, rather than write a
> whole new pass.
> It is one of the listed todos to use scalar promotion of stores like
this.
I looked into tree-ssa-sink pass. It seems like right now it doesn't sink
statements without ssa register as LHS. Anyway even if it did, it woudn't
catch the case I'm trying to optimize. I think that transformation I'm
trying
is more similar to a store sinking which is done as part of lim pass.
Am I missing something?
Thanks,
-- Victor