On Tue, Mar 24, 2015 at 3:39 PM, Connor Abbott <cwabbo...@gmail.com> wrote:
> I think this is being both too aggressive and not aggressive enough.
> First, the too aggressive part. Imagine if we have something like:
>
> a = mul b, c;
> d = add a, 1.0;
> e = add a, 2.0;
> f = add a, 3.0;
>
> In this case, we don't want to turn this into a series of 3 mad's
> since the 3 load immediate instructions are going to hurt us more than
> the elimination of the mul. When the only thing using the mul is a
> bunch of add's, it's only profitable when there's at most one distinct
> immediate that isn't used by other MAD's -- any more and we gain
> instructions.

I think most importantly, we want to match the current try_emit_mad()
behavior (and just do it better) and make incremental progress from
there.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to