Skip to content
Commit d14d70de authored by Connor Abbott's avatar Connor Abbott Committed by Dylan Baker
Browse files

nir/sink: Rewrite loop handling logic



Previously, for code like:
loop {
    loop {
        a = load_ubo()
    }
    use(a)
}
adjust_block_for_loops() would return the block before the first loop.
Now we compute the range of allowed blocks and then walk the dominance
tree directly, guaranteeing directly that we always choose a block that
dominates all the uses and is dominated by the definition.

Reviewed-by: default avatarDaniel Schürmann <daniel@schuermann.dev>
(cherry picked from commit af9296b8)
parent 0beee2f7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment