• Timothy Arceri's avatar
    nir: add loop unroll support for wrapper loops · e4a5db47
    Timothy Arceri authored
    This adds support for unrolling the classic
    
        do {
            // ...
        } while (false)
    
    that is used to wrap multi-line macros. GLSL IR also wraps switch
    statements in a loop like this.
    
    shader-db results IVB:
    
    total loops in shared programs: 2515 -> 2512 (-0.12%)
    loops in affected programs: 33 -> 30 (-9.09%)
    helped: 3
    HURT: 0
    e4a5db47
nir_opt_loop_unroll.c 23.2 KB