-
I was trying to be clever here, skipping ahead to the newly-created block and processing the remaining instructions after the split in the same loop. But if the last instruction in a block was lowered, the saved next instruction would be the head of the block before the split, not the new block, and we would compare it to the new block so we wouldn't stop like we were supposed to. Stop being so clever, and just restart processing with the new block after lowering an instruction. Because we're wrapping the actual transform in yet another loop, and the restarting logic is a bit tricky, refactor the actual lowering into a separate lower_instr function. Otherwise we'd be mixing the two and indenting the actual logic even more. Part-of: <mesa/mesa!13928>
969369e9