v2: - make use of nir_block_dominates() in the if-statement opts as suggested by Connor. This allowed for a reduction in code required but also allowed me to implemented some extra optimisations. - implement feedback from Jason on loop unrolling opts.