Mesa (master): aco: don't schedule instructions through depending VMEM instructions

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Oct 30 16:21:51 UTC 2019


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

Author: Daniel Schürmann <daniel at schuermann.dev>
Date:   Thu Oct 10 16:31:40 2019 +0200

aco: don't schedule instructions through depending VMEM instructions

Previously, the scheduler tried to move up instructions from below depending
VMEM instructions only to move them down again when scheduling the VMEM
instruction.

Reviewed-by: Rhys Perry <pendingchaos02 at gmail.com>

---

 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 30a82e68ce8..14f0f71385a 100644
--- a/src/amd/compiler/aco_scheduler.cpp
+++ b/src/amd/compiler/aco_scheduler.cpp
@@ -336,6 +336,9 @@ void schedule_SMEM(sched_ctx& ctx, Block* block,
       /* check if candidate depends on current */
       bool is_dependency = std::any_of(candidate->operands.begin(), candidate->operands.end(),
                                        [&ctx](const Operand& op) { return op.isTemp() && ctx.depends_on[op.tempId()];});
+      /* no need to steal from following VMEM instructions */
+      if (is_dependency && candidate->isVMEM())
+         break;
       if (moving_spill && is_spill_reload(candidate))
          is_dependency = true;
       if ((moving_interaction & barrier_shared) && candidate->format == Format::DS)




More information about the mesa-commit mailing list