[Mesa-dev] [Bug 32211] [GLSL] lower_jumps with continue-statements in for-loops prevents loop unrolling

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Apr 12 11:04:58 UTC 2018


https://bugs.freedesktop.org/show_bug.cgi?id=32211

Timothy Arceri <t_arceri at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|t_arceri at yahoo.com.au       |mesa-dev at lists.freedesktop.
                   |                            |org

--- Comment #11 from Timothy Arceri <t_arceri at yahoo.com.au> ---
With NIR we end up with :

        loop {
                block block_1:
                /* preds: block_0 block_5 block_7 */
                vec1 32 ssa_8 = phi block_0: ssa_3, block_5: ssa_4, block_7:
ssa_19
                vec1 32 ssa_9 = phi block_0: ssa_2, block_5: ssa_17, block_7:
ssa_4
                vec1 32 ssa_10 = phi block_0: ssa_1, block_5: ssa_4, block_7:
ssa_4
                vec1 32 ssa_11 = phi block_0: ssa_0, block_5: ssa_4, block_7:
ssa_4
                vec1 32 ssa_12 = phi block_0: ssa_4, block_5: ssa_16, block_7:
ssa_18
                vec4 32 ssa_13 = vec4 ssa_8, ssa_9, ssa_10, ssa_11
                vec1 32 ssa_14 = ige ssa_12, ssa_5
                /* succs: block_2 block_3 */
                if ssa_14 {
                        block block_2:
                        /* preds: block_1 */
                        break
                        /* succs: block_8 */
                } else {
                        block block_3:
                        /* preds: block_1 */
                        /* succs: block_4 */
                }
                block block_4:
                /* preds: block_3 */
                vec1 32 ssa_15 = ilt ssa_6, ssa_12
                /* succs: block_5 block_6 */
                if ssa_15 {
                        block block_5:
                        /* preds: block_4 */
                        vec1 32 ssa_16 = iadd ssa_12, ssa_7
                        vec1 32 ssa_17 = load_const (0x3f800000 /* 1.000000 */)
                        continue
                        /* succs: block_1 */
                } else {
                        block block_6:
                        /* preds: block_4 */
                        /* succs: block_7 */
                }
                block block_7:
                /* preds: block_6 */
                vec1 32 ssa_18 = iadd ssa_12, ssa_7
                vec1 32 ssa_19 = load_const (0x3f800000 /* 1.000000 */)
                /* succs: block_1 */
        }

So all we need to do is move everything after the if into the else block and
remove the continue. Removing myself as assignee, this would probably be a good
beginners task.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180412/2add2879/attachment.html>


More information about the mesa-dev mailing list