aco: add missing add_to_hazard_query
authorRhys Perry <pendingchaos02@gmail.com>
Fri, 24 Jul 2020 14:49:43 +0000 (15:49 +0100)
committerMarge Bot <eric+marge@anholt.net>
Tue, 28 Jul 2020 16:56:34 +0000 (16:56 +0000)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4905>

src/amd/compiler/aco_scheduler.cpp

index cb22491bf64a1b5a2c58b553d591e26ec89c7cda..d837059cfd4e8216c903d00340b5b16249fae89b 100644 (file)
@@ -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++;