Have PredicateBlocks jump the existing merge blocks. (#1849)
* Refactor PredicateBlocks Refactor PredicateBlocks so that we know which constructs a return is contained in. Will be used later. * Have PredicateBlocks jump the existing merge blocks. In PredicateBlocks, we currently skip instructions with side effects, but it still follows the same control flow (sort-of). This causes a problem, when we are trying to predicate code in a loop. We skip all of the code with side effects (IV increment), but still follow the same control flow (jump back the start of the loop). This creates an infinite loop because the code will keep jumping back to the start of the loop without changing the values that effect the exit condition. This is a large change to merge-return. When predicating a block that is in a loop or merge construct, it will jump to the merge block of the construct. Once out of all constructs we will generate code as we did before.
Loading
Please register or sign in to comment