Mesa (staging/21.0): ir3/cp_postsched: Set address of uses for relative mov's

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Apr 8 17:07:40 UTC 2021


Module: Mesa
Branch: staging/21.0
Commit: 83b4735393a5680a7ac55463f29471cddee26840
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=83b4735393a5680a7ac55463f29471cddee26840

Author: Connor Abbott <cwabbott0 at gmail.com>
Date:   Fri Mar 19 16:37:30 2021 +0100

ir3/cp_postsched: Set address of uses for relative mov's

Fixes: 680ca5b ("freedreno/ir3: add post-scheduler cp pass")
Reviewed-by: Rob Clark <robdclark at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10076>
(cherry picked from commit 1ad5ee5a04374883b38be33db33bf333b93a7219)

---

 .pick_status.json                    | 2 +-
 src/freedreno/ir3/ir3_cp_postsched.c | 9 ++++++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index cc3aa948500..d96058b5fd0 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -76,7 +76,7 @@
         "description": "ir3/cp_postsched: Set address of uses for relative mov's",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "680ca5b393827bde8b3a8f7dc1893d0f646494ef"
     },
diff --git a/src/freedreno/ir3/ir3_cp_postsched.c b/src/freedreno/ir3/ir3_cp_postsched.c
index f761dc19880..ba5ff6b97b4 100644
--- a/src/freedreno/ir3/ir3_cp_postsched.c
+++ b/src/freedreno/ir3/ir3_cp_postsched.c
@@ -167,11 +167,14 @@ instr_cp_postsched(struct ir3_instruction *mov)
 			removed = true;
 		}
 
-		/* the use could have been only a false-dep, only add to
-		 * the newdeps array if we've actually updated a real
-		 * src reg for the use:
+		/* the use could have been only a false-dep, only add to the newdeps
+		 * array and update the address if we've actually updated a real src
+		 * reg for the use:
 		 */
 		if (removed) {
+			if (src->flags & IR3_REG_RELATIV)
+				ir3_instr_set_address(use, mov->address);
+
 			util_dynarray_append(&newdeps, struct ir3_instruction *, use);
 
 			/* Remove the use from the src instruction: */



More information about the mesa-commit mailing list