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


Hello,

> "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.

this is what people suggested that you could change.

> Anyway even if it did, it woudn't
> catch the case I'm trying to optimize.

You would have to add this transformation to tree-ssa-sink; still, a lot
of code would be shared.

> 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?

That the code above does not necessarily have to be inside a loop.

Zdenek


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