Mesa (master): pan/bi: Set clause_state.message conservatively

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Mar 7 15:25:30 UTC 2021


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

Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date:   Sun Mar  7 01:30:05 2021 +0000

pan/bi: Set clause_state.message conservatively

Accidentally prevented scheduling message-passing instructions to
anywhere but the last ADD of a clause.

total nops in shared programs: 86280 -> 86266 (-0.02%)
nops in affected programs: 1609 -> 1595 (-0.87%)
helped: 9
HURT: 4
Inconclusive result (value mean confidence interval includes 0).

total clauses in shared programs: 20993 -> 20813 (-0.86%)
clauses in affected programs: 3488 -> 3308 (-5.16%)
helped: 116
HURT: 0
Clauses are helped.

total quadwords in shared programs: 91697 -> 91572 (-0.14%)
quadwords in affected programs: 12257 -> 12132 (-1.02%)
helped: 53
HURT: 2
Quadwords are helped.

Fixes: f0c0082ab01 ("pan/bi: Schedule blocks")
Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Tested-by: Icecream95 <ixn at disroot.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9446>

---

 src/panfrost/bifrost/bi_schedule.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/src/panfrost/bifrost/bi_schedule.c b/src/panfrost/bifrost/bi_schedule.c
index edce091f9bb..66004aaacdc 100644
--- a/src/panfrost/bifrost/bi_schedule.c
+++ b/src/panfrost/bifrost/bi_schedule.c
@@ -1304,16 +1304,13 @@ bi_schedule_clause(bi_context *ctx, bi_block *block, struct bi_worklist st)
                 tuple->add = tuple_state.add;
 
                 /* We may have a message, but only one per clause */
-                if (tuple->add) {
-                        enum bifrost_message_type msg =
-                                bi_message_type_for_instr(tuple->add);
-                        assert(!(msg && clause->message_type));
+                if (tuple->add && bi_must_message(tuple->add)) {
+                        assert(!clause_state.message);
+                        clause_state.message = true;
 
-                        if (!clause->message_type) {
-                                clause->message_type = msg;
-                                clause->message = tuple->add;
-                                clause_state.message = true;
-                        }
+                        clause->message_type =
+                                bi_message_type_for_instr(tuple->add);
+                        clause->message = tuple->add;
 
                         switch (tuple->add->op) {
                         case BI_OPCODE_ATEST:



More information about the mesa-commit mailing list