Mesa (master): aco: add missing add_to_hazard_query

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jul 28 17:17:21 UTC 2020


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

Author: Rhys Perry <pendingchaos02 at gmail.com>
Date:   Fri Jul 24 15:49:43 2020 +0100

aco: add missing add_to_hazard_query

Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Daniel Schürmann <daniel at schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4905>

---

 src/amd/compiler/aco_scheduler.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/amd/compiler/aco_scheduler.cpp b/src/amd/compiler/aco_scheduler.cpp
index cb22491bf64..d837059cfd4 100644
--- a/src/amd/compiler/aco_scheduler.cpp
+++ b/src/amd/compiler/aco_scheduler.cpp
@@ -701,6 +701,7 @@ void schedule_VMEM(sched_ctx& ctx, Block* block,
          continue;
       }
 
+      Instruction *candidate_ptr = candidate.get();
       MoveResult res = ctx.mv.downwards_move(part_of_clause);
       if (res == move_fail_ssa || res == move_fail_rar) {
          add_to_hazard_query(&indep_hq, candidate.get());
@@ -710,6 +711,8 @@ void schedule_VMEM(sched_ctx& ctx, Block* block,
       } else if (res == move_fail_pressure) {
          break;
       }
+      if (part_of_clause)
+         add_to_hazard_query(&indep_hq, candidate_ptr);
       k++;
       if (candidate_idx < ctx.last_SMEM_dep_idx)
          ctx.last_SMEM_stall++;



More information about the mesa-commit mailing list