Fix infinite loop in dead-branch-elimination (#1891)
* Create structed cfg analysis. There are lots of optimization that have to traverse the CFG in a structured order just because it wants to know which constructs a basic block in contained in. This adds extra complexity to these optimizations, for causes too much refactoring of older optimizations. To help with this problem, I have written an analysis that can give this information. * Identify branches breaking from loops. Dead branch elimination does a search for a conditional branch to the end of the current selection construct. This search assumes that the only way to leave the construct is through the merge node. But that is not true. The code can jump to the merge node of a loop that contains the construct. The search needs to take this into consideration.
Loading
Please register or sign in to comment