nir: Skip emitting no-op movs from the builder.
authorEric Anholt <eric@anholt.net>
Mon, 16 Sep 2019 21:34:20 +0000 (14:34 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 4 Oct 2019 19:15:01 +0000 (19:15 +0000)
commit7025dbe794b53b030ae0a3cb55217ea831a810d9
tree7c9a0da9721ac9de7daa59b60c7422ebd6d6220e
parente7b754a05cc60818632d9968787dbdac6145fa82
nir: Skip emitting no-op movs from the builder.

Having passes generate these is just making more work for copy
propagation (and thus probably calling more optimization passes)
later.  Noticed while trying to debug nir_opt_algebraic()
top-to-bottom having O(n^2) behavior due to not finding new matches in
replacement code.

Reviewed-by: Ian Romanick <ian.d.romainck@intel.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/compiler/nir/nir_builder.h
src/compiler/nir/nir_search.c