In LoopUnswitch when replacing a branch Parent -> Succ with a conditional
branch Parent -> True & Parent->False, the DomTree updates should insert an edge for
each of True/False if True/False are different than Succ, and delete Parent->Succ edge
if both are different. The comparison with Succ appears to be incorect,
it's comparing with Parent instead.
There is no test failing either before or after this change, but it seems to me this is
the right way to do the update.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Transforms/Scalar/LoopUnswitch.cpp | ||
---|---|---|
945 ↗ | (On Diff #152387) | I'm not sure we can get that info in this method. This is essentially an util, independent of the loopunswitch logic at the callsite. |
947 ↗ | (On Diff #152387) | This should not be possible. |
Comment Actions
LGTM
lib/Transforms/Scalar/LoopUnswitch.cpp | ||
---|---|---|
947 ↗ | (On Diff #152387) | I think it would make it clear for whoever tries to figure out the correct logic here later. |
Comment Actions
Thank you for the review!
lib/Transforms/Scalar/LoopUnswitch.cpp | ||
---|---|---|
947 ↗ | (On Diff #152387) | Ack, done. |
Comment Actions
It'd be nice to get a test case here, but if its not feasible, the change is obviously correct (or at least an improvement!!!)
LGTM.