Re: [Mesa-dev] [PATCH 1/2] nir: add pass to move load_const

2018-06-06 Thread Rob Clark
On Wed, Jun 6, 2018 at 8:34 PM, Ian Romanick wrote: > On 06/06/2018 04:47 PM, Rob Clark wrote: >> On Wed, Jun 6, 2018 at 6:51 PM, Ian Romanick wrote: >>> On 06/06/2018 07:43 AM, Rob Clark wrote: Run this pass late (after opt loop) to move load_const instructions back into the basic bloc

Re: [Mesa-dev] [PATCH 1/2] nir: add pass to move load_const

2018-06-06 Thread Ian Romanick
On 06/06/2018 04:47 PM, Rob Clark wrote: > On Wed, Jun 6, 2018 at 6:51 PM, Ian Romanick wrote: >> On 06/06/2018 07:43 AM, Rob Clark wrote: >>> Run this pass late (after opt loop) to move load_const instructions back >>> into the basic blocks which use the result, in cases where a load_const >>> is

Re: [Mesa-dev] [PATCH 1/2] nir: add pass to move load_const

2018-06-06 Thread Rob Clark
On Wed, Jun 6, 2018 at 6:51 PM, Ian Romanick wrote: > On 06/06/2018 07:43 AM, Rob Clark wrote: >> Run this pass late (after opt loop) to move load_const instructions back >> into the basic blocks which use the result, in cases where a load_const >> is only consumed in a single block. > > If the lo

Re: [Mesa-dev] [PATCH 1/2] nir: add pass to move load_const

2018-06-06 Thread Ian Romanick
On 06/06/2018 03:51 PM, Ian Romanick wrote: > On 06/06/2018 07:43 AM, Rob Clark wrote: >> Run this pass late (after opt loop) to move load_const instructions back >> into the basic blocks which use the result, in cases where a load_const >> is only consumed in a single block. > > If the load_const

Re: [Mesa-dev] [PATCH 1/2] nir: add pass to move load_const

2018-06-06 Thread Ian Romanick
On 06/06/2018 07:43 AM, Rob Clark wrote: > Run this pass late (after opt loop) to move load_const instructions back > into the basic blocks which use the result, in cases where a load_const > is only consumed in a single block. If the load_const is used in more than one block, you could use it to

[Mesa-dev] [PATCH 1/2] nir: add pass to move load_const

2018-06-06 Thread Rob Clark
Run this pass late (after opt loop) to move load_const instructions back into the basic blocks which use the result, in cases where a load_const is only consumed in a single block. This helps reduce register usage in cases where the backend driver cannot lower the load_const to a uniform. Signed-