Mesa (master): nir: Properly invalidate metadata in nir_opt_remove_phis().

Kenneth Graunke kwg at kemper.freedesktop.org
Wed Nov 4 01:11:07 UTC 2015


Module: Mesa
Branch: master
Commit: 59bbe2681b73c3795b7298e2486d5fde7c464ed5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=59bbe2681b73c3795b7298e2486d5fde7c464ed5

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Mon Nov  2 21:43:40 2015 -0800

nir: Properly invalidate metadata in nir_opt_remove_phis().

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand at intel.com>
Reviewed-by: Eduardo Lima Mitev <elima at igalia.com>
Cc: mesa-stable at lists.freedesktop.org

---

 src/glsl/nir/nir_opt_remove_phis.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/glsl/nir/nir_opt_remove_phis.c b/src/glsl/nir/nir_opt_remove_phis.c
index 5bdf7ef..66d3754 100644
--- a/src/glsl/nir/nir_opt_remove_phis.c
+++ b/src/glsl/nir/nir_opt_remove_phis.c
@@ -108,6 +108,11 @@ remove_phis_impl(nir_function_impl *impl)
 
    nir_foreach_block(impl, remove_phis_block, &progress);
 
+   if (progress) {
+      nir_metadata_preserve(impl, nir_metadata_block_index |
+                                  nir_metadata_dominance);
+   }
+
    return progress;
 }
 




More information about the mesa-commit mailing list