Mesa (master): pan/bi: Respect side effects in DCE

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Feb 5 18:01:43 UTC 2021


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

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Wed Feb  3 14:35:02 2021 -0500

pan/bi: Respect side effects in DCE

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8848>

---

 src/panfrost/bifrost/bi_opt_dce.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/panfrost/bifrost/bi_opt_dce.c b/src/panfrost/bifrost/bi_opt_dce.c
index 517ff11fcc3..589198e4738 100644
--- a/src/panfrost/bifrost/bi_opt_dce.c
+++ b/src/panfrost/bifrost/bi_opt_dce.c
@@ -48,7 +48,7 @@ bi_opt_dead_code_eliminate(bi_context *ctx, bi_block *block, bool soft)
                 unsigned index = bi_get_node(ins->dest[0]);
 
                 if (index < temp_count && !live[index]) {
-                        if (soft)
+                        if (soft || bi_side_effects(ins->op))
                                 ins->dest[0] = bi_null();
                         else
                                 bi_remove_instruction(ins);



More information about the mesa-commit mailing list