nir/opt_if: don't mark progress if nothing changes
authorKarol Herbst <kherbst@redhat.com>
Tue, 12 Feb 2019 19:59:35 +0000 (20:59 +0100)
committerKarol Herbst <kherbst@redhat.com>
Tue, 12 Feb 2019 23:21:35 +0000 (00:21 +0100)
commit7e08f22a72cfc379902feeca3673db6aa344f782
tree179211d909c919ee59af67a6fdd09b46bb758bbf
parent3c540e0a748844258e77254fc4f864f3b875fe18
nir/opt_if: don't mark progress if nothing changes

if we have something like this:

loop {
   ...
   if x {
      break;
   } else {
      continue;
   }
}

opt_if_loop_last_continue returns true marking progress allthough nothing
changes.

Fixes: 5921a19d4b0c6 "nir: add if opt opt_if_loop_last_continue()"
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_opt_if.c