Re: [Mesa-dev] [PATCH 1.5/3] nir: Add a nir_instr_move helper

2018-07-05 Thread Caio Marcelo de Oliveira Filho
> > Should we also consider the block-based cursor options here? Moving > > the first instruction of a block before that block > > (nir_cursor_before_block), etc. > > > > That should be fine as-is as nir_instr_insert should do the right thing. > The reason the cursor.instr == instr case is a probl

Re: [Mesa-dev] [PATCH 1.5/3] nir: Add a nir_instr_move helper

2018-07-05 Thread Jason Ekstrand
On Thu, Jul 5, 2018 at 12:55 PM, Caio Marcelo de Oliveira Filho < caio.olive...@intel.com> wrote: > On Wed, Jul 04, 2018 at 09:55:26AM -0700, Jason Ekstrand wrote: > > Removes an instruction from one place and inserts it at another while > > working around a weird cursor corner-case. > > Is the we

Re: [Mesa-dev] [PATCH 1.5/3] nir: Add a nir_instr_move helper

2018-07-05 Thread Caio Marcelo de Oliveira Filho
On Wed, Jul 04, 2018 at 09:55:26AM -0700, Jason Ekstrand wrote: > Removes an instruction from one place and inserts it at another while > working around a weird cursor corner-case. Is the weird corner case the move to the same place case? > --- a/src/compiler/nir/nir.c > +++ b/src/compiler/nir/n

[Mesa-dev] [PATCH 1.5/3] nir: Add a nir_instr_move helper

2018-07-04 Thread Jason Ekstrand
Removes an instruction from one place and inserts it at another while working around a weird cursor corner-case. --- src/compiler/nir/nir.c | 15 +++ src/compiler/nir/nir.h | 2 ++ 2 files changed, 17 insertions(+) diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index c5