[Mesa-dev] [PATCH v2] nir/dead_cf: also remove useless ifs

Caio Marcelo de Oliveira Filho caio.oliveira at intel.com
Mon Mar 19 22:59:48 UTC 2018


> > @@ -136,17 +136,27 @@ static bool
> >  cf_node_has_side_effects(nir_cf_node *node)
> >  {
> >     nir_foreach_block_in_cf_node(block, node) {
> > +      bool inside_loop = node->type == nir_cf_node_loop;
> > +      for (nir_cf_node *n = &block->cf_node; !inside_loop && n != node; n
> > = n->parent) {
> >
> 
> Is there some reason why you added !inside_loop to the condition?  Just to
> avoid looping if we detect it early?

Yes.


> The only part of this comment change that looks relevant is the first bit
> where you make it also talk about ifs.  That said, I think your updates are
> reasonable, they just probably belong in their own patch.

Will split the comment changes to its own patch (and fix the spurious
whitespace).


Thanks,
Caio


More information about the mesa-dev mailing list