nir: Fix non-determinism in lower_global_vars_to_local
authorConnor Abbott <cwabbott0@gmail.com>
Tue, 22 Oct 2019 15:50:07 +0000 (17:50 +0200)
committerConnor Abbott <cwabbott0@gmail.com>
Thu, 14 Nov 2019 13:10:58 +0000 (13:10 +0000)
commitf9fd04aca15fd00889caa666ba38007268e67f5c
treecc8b38e7e436a28ee0da648231c68b238f47e8f6
parentf512965b0b3d70525424f100e534b8ac0a43a376
nir: Fix non-determinism in lower_global_vars_to_local

Using a hash-table walk means that variables will get inserted in
different orders on different runs. Just walk the list of globals
instead, even if some of them can't be turned into locals.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/compiler/nir/nir_lower_global_vars_to_local.c