Conor McCarthy (@cmccarthy) commented about libs/vkd3d-shader/ir.c:
* important that the loop break target matches
* `successor'. So we have to move that interval's begin
* point to the begin point of the candidate interval,
* i.e. `begin'. But what if the interval we should extend
* backward is not synthetic? This cannot happen,
* fortunately, because it would mean that there is a jump
* entering a loop via a block which is not the loop
* header, so the CFG would not be reducible. */
for (k = 0; k < cfg->loop_interval_count; ++k)
{
struct cfg_loop_interval *interval = &cfg->loop_intervals[k];
if (interval->begin < successor->order_pos && successor->order_pos < interval->end)
{
if (interval->synthetic)
interval->begin = min(begin, interval->begin);
`interval` is nested within an outer interval (`begin`, `successor->order_pos`), correct? I understand the value of moving the nested `begin` up as high as possible in case there are other branches it should contain, but are there other reasons for doing this? In particular, does the algorithm depend on it?