Re: [Mesa-dev] [PATCH 2/5] nir: shuffle constants to the top

2017-01-18 Thread Jason Ekstrand
On Tue, Jan 17, 2017 at 6:12 PM, Timothy Arceri < timothy.arc...@collabora.com> wrote: > If one of the inputs to and mul/add is the result of an another > mul/add there is a chance that we can reuse the result of that > mul/add in other calls if we do the multiplication in the right > order. > >

[Mesa-dev] [PATCH 2/5] nir: shuffle constants to the top

2017-01-17 Thread Timothy Arceri
If one of the inputs to and mul/add is the result of an another mul/add there is a chance that we can reuse the result of that mul/add in other calls if we do the multiplication in the right order. Also by attempting to move all constants to the top we increase the chance of constant folding. Fo