Conor McCarthy (@cmccarthy) commented about libs/vkd3d-shader/ir.c:
- If the input CFG is reducible, each two loops are either disjoint
- or one is a strict subset of the other, provided that each block
- has at most one incoming back edge. If this condition does not
- hold, a synthetic block can be introduced as the only back edge
- block for the given header block, with all the previous back edge
- now being forward edges to the synthetic block. This is not
- currently implemented (but it is rarely found in practice
- anyway). */
+static enum vkd3d_result vsir_cfg_scan_loop(struct vsir_block_list *loop, struct vsir_block *block,
struct vsir_block *header)
+{
- enum vkd3d_result ret;
- size_t i;
- if (!vsir_block_dominates(header, block))
return VKD3D_OK;
Does this situation indicate a problem? Recursion terminates on `block == header`, so if we find a block not dominated by `header` , a block outside the loop branches to within the loop, right?