[Mesa-dev] [PATCH] st_glsl_to_tgsi: only do mov copy propogation on temps

Kenneth Graunke kenneth at whitecape.org
Wed Mar 25 16:42:40 PDT 2015


On Wednesday, March 25, 2015 07:33:43 PM Ilia Mirkin wrote:
> On Wed, Mar 25, 2015 at 7:18 PM, Dave Airlie <airlied at gmail.com> wrote:
> > From: Dave Airlie <airlied at redhat.com>
> >
> > Don't propoate ARRAY
> >
> > This should fix:
> > https://bugs.freedesktop.org/show_bug.cgi?id=89759
> >
> > Signed-off-by: Dave Airlie <airlied at redhat.com>
> > Cc: mesa-stable at lists.freedesktop.org
> 
> Note that this disables propagating IN[] reads as well, which was
> apparently the point of this pass (based on the comments on the top).
> And while IN[] can never be modified, TEMP[] certainly can -- why have
> we never seen this issue with temps? Is that what the ACP tracking is
> for? (What does ACP stand for? A** Copy Propagation?)

"ACP" comes from Steven Muchnick's "Advanced Compiler Design and
Implementation", page 357.  It's the name of the variable used for the
set in his pseudocode that explains the algorithm.

The book typically introduces short names like "ACP" and "AEB" without
ever explaining what they stand for.

My guess is "Assignment".

> Perhaps you should do inst->src[0].file != PROGRAM_ARRAY ?

That seems better to me - propagating inputs is almost certainly very
important.

> > ---
> >  src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp 
b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> > index db69a08..829644f 100644
> > --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> > +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> > @@ -3938,6 +3938,7 @@ glsl_to_tgsi_visitor::copy_propagate(void)
> >               inst->dst[0].index == inst->src[0].index) &&
> >            !inst->dst[0].reladdr &&
> >            !inst->saturate &&
> > +          inst->src[0].file == PROGRAM_TEMPORARY &&
> >            !inst->src[0].reladdr &&
> >            !inst->src[0].reladdr2 &&
> >            !inst->src[0].negate) {
> > --
> > 2.1.0
> >
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150325/4fb181e2/attachment.sig>


More information about the mesa-dev mailing list