nir: Share destination rewriting and replacement code in IO lowering.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 12 Jul 2016 09:30:02 +0000 (02:30 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 16 Jul 2016 00:17:09 +0000 (17:17 -0700)
commitcdfc05ea6e8c87876cdbf588aa8e03d70f3da4bb
treef8d32410ba0560f9c71557f82eba299d0fde5cd3
parent349fe79c9bc9bd20b877f0425763509208179b47
nir: Share destination rewriting and replacement code in IO lowering.

Both loads and atomics had identical code to rewrite destinations,
and all cases had the same two lines to replace instructions.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_lower_io.c