This patch teaches LoopSimplifyCFG to remove dead exiting edges
from loops.
Details
Diff Detail
Event Timeline
Rebased, lifted limitation related to breaking connectivity between nested and parent loops.
lib/Transforms/Scalar/LoopSimplifyCFG.cpp | ||
---|---|---|
109 | We generate switches basing on this, and SmallPtrSet has a non-deterministic order. Need underlying NFC to make it a vector. |
Fixed messy comments, rebased on top of deterministic collection of exit blocks, tests updated accordingly.
lib/Transforms/Scalar/LoopSimplifyCFG.cpp | ||
---|---|---|
262 | Minor nit - your current code splits preheader at terminator, so <preheader code> is left at preheader, |
We generate switches basing on this, and SmallPtrSet has a non-deterministic order. Need underlying NFC to make it a vector.