OSDN Git Service

nir: Do not use continue block after removing it.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sat, 14 Jul 2018 23:19:17 +0000 (01:19 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fri, 20 Jul 2018 10:09:19 +0000 (12:09 +0200)
commit8cacf38f527d42e41441ef8c25d95d4b2f4e8602
tree452ba4b392264021e195d8d0a333374e226a7e17
parentce454d02cc4c3d6bd0e69af82933731abaccfebb
nir: Do not use continue block after removing it.

Reinserting code directly before a jump means the block gets split
and merged, removing the original block and replacing it in the
process.

Hence keeping a pointer to the continue block over a reinsert
causes issues.

This code changes nir_opt_if to simply look for the new continue
block.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107275
CC: 18.1 <mesa-stable@lists.freedesktop.org>
src/compiler/nir/nir_opt_if.c