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

Author: Rhys Perry <[email protected]>
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: <[email protected]>
Signed-off-by: Rhys Perry <[email protected]>
Reviewed-by: Daniel Schürmann <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3257>

---

 src/amd/compiler/aco_spill.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/amd/compiler/aco_spill.cpp b/src/amd/compiler/aco_spill.cpp
index e0c3ea955cd..576b8e02aea 100644
--- a/src/amd/compiler/aco_spill.cpp
+++ b/src/amd/compiler/aco_spill.cpp
@@ -665,7 +665,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;

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to