Mesa (staging/19.3): aco: don't consider loop header blocks branch blocks in add_coupling_code
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jan 30 18:51:24 UTC 2020
Module: Mesa
Branch: staging/19.3
Commit: 9c1ca7f8ab1737099f20bc0ca27cedd5c5b3ee4f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9c1ca7f8ab1737099f20bc0ca27cedd5c5b3ee4f
Author: Rhys Perry <pendingchaos02 at gmail.com>
Date: Thu Jan 2 14:54:31 2020 +0000
aco: don't consider loop header blocks branch blocks in add_coupling_code
Loops without continues create header blocks with only 1 predecessor.
CC: <mesa-stable at lists.freedesktop.org>
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/3257>
(cherry picked from commit 521525fc0a3b9008e70841542ad6e3db4b1ea4d6)
---
.pick_status.json | 2 +-
src/amd/compiler/aco_spill.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index a503d497177..403ccccdaed 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -409,7 +409,7 @@
"description": "aco: don't consider loop header blocks branch blocks in add_coupling_code",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": null
},
diff --git a/src/amd/compiler/aco_spill.cpp b/src/amd/compiler/aco_spill.cpp
index 952094f40d0..cc662e97418 100644
--- a/src/amd/compiler/aco_spill.cpp
+++ b/src/amd/compiler/aco_spill.cpp
@@ -659,7 +659,7 @@ void add_coupling_code(spill_ctx& ctx, Block* block, unsigned block_idx)
std::vector<aco_ptr<Instruction>> instructions;
/* branch block: TODO take other branch into consideration */
- if (block->linear_preds.size() == 1 && !(block->kind & block_kind_loop_exit)) {
+ if (block->linear_preds.size() == 1 && !(block->kind & (block_kind_loop_exit | block_kind_loop_header))) {
assert(ctx.processed[block->linear_preds[0]]);
assert(ctx.register_demand[block_idx].size() == block->instructions.size());
std::vector<RegisterDemand> reg_demand;
More information about the mesa-commit
mailing list