diff options
author | Jason Ekstrand <jason.ekstrand@intel.com> | 2014-12-15 14:06:58 -0800 |
---|---|---|
committer | Jason Ekstrand <jason.ekstrand@intel.com> | 2015-01-15 07:20:22 -0800 |
commit | bc0735857f1f36eede7e8e5382f8e9bbc496fecb (patch) | |
tree | f326d0b1d361eba320d5735e5c558aaecd68ce85 /src/loader | |
parent | dfb3abbaecfbe30b8858a5428c604f9d90f65505 (diff) | |
download | external_mesa3d-bc0735857f1f36eede7e8e5382f8e9bbc496fecb.zip external_mesa3d-bc0735857f1f36eede7e8e5382f8e9bbc496fecb.tar.gz external_mesa3d-bc0735857f1f36eede7e8e5382f8e9bbc496fecb.tar.bz2 |
nir/lower_variables: Use a real dominance DFS for variable renaming
Previously, we were just iterating over the program "in order" which
kind-of approximates a DFS, but not really. In particular, we got the
following case wrong:
loop {
a = 3;
if (foo) {
a = 5;
} else {
break;
}
use(a);
}
where use(a) would get 3 instead of 5 because of premature popping of the
SSA def stack. Now, since we do an actaul DFS, we should evaluate use(a)
immediately after a = 5 and we should be ok.
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Diffstat (limited to 'src/loader')
0 files changed, 0 insertions, 0 deletions