[Mesa-dev] [PATCH] nir: allow stitching of non-empty block

Juan A. Suarez Romero jasuarez at igalia.com
Tue Feb 12 18:12:42 UTC 2019


On Tue, 2019-02-12 at 09:38 -0800, Caio Marcelo de Oliveira Filho wrote:
> Hi Juan,
> 
> On Tue, Feb 12, 2019 at 04:37:23PM +0100, Juan A. Suarez Romero wrote:
> > On Fri, 2019-02-08 at 15:39 -0600, Jason Ekstrand wrote:
> > > I had a chat with Caio about this and I'm skeptical.  In general, users of the CF manipulation code shouldn't be stitching two blocks together where the first contains a jump and the second is non-empty.  If the caller knows that this case is ok, then they can check for it and empty out the one block before stitching.  Also, I'm not really seeing how peel_initial_if would hit this case from your example.
> > > 
> > > 
> > The problem happens when moving the continous list to the end of continue block in loop; the former ends in a jump ("break") and the later also ends in a jump ("continue"), so stitch block complains because there will be an instruction (the "continue") after the jump (the "break").
> 
> I was investigating this yesterday and attempted to write a MR, could
> you take a look?
> 
> https://gitlab.freedesktop.org/mesa/mesa/merge_requests/238
> 
> 


I had sent a patch to fix it (https://patchwork.freedesktop.org/patch/285649/)
which is similar to your MR.

Other than that, your MR also fixes the issue.

	J.A.



> 	Caio
> 



More information about the mesa-dev mailing list