This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]