Comment # 36 on bug 90887 from
Created attachment 117865 [details] [review]
Edge type fix for prototype patch

With this patch on top of the prototype patch edge splitting during
PhiMovesPass should no longer change non forward edges to forward. I think with
current master this isn't a problem, because the split edge will always be a
forward edge, but this still isn't a valid assumption.

After adding the following patch the fs-critical-edge test shows that edge
splitting now preserves the edge type. This patch should also solve the 'all
incoming edges are forward edges' problem that may be the cause of the missing
blocks.

diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
index f153674..753bcbf 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
@@ -2838,7 +2838,7 @@ Converter::handleInstruction(const struct
tgsi_full_instruction *insn)
       }

       if (prevBB->getExit()->op == OP_BRA) {
-         prevBB->cfg.attach(&convBB->cfg, Graph::Edge::FORWARD);
+         prevBB->cfg.attach(&convBB->cfg, Graph::Edge::TREE);
          prevBB->getExit()->asFlow()->target.bb = convBB;
       }
       setPosition(convBB, true);


You are receiving this mail because: