This is an archive of the discontinued LLVM Phabricator instance.

[SDA] Don't stop divergence propagation at the IPD.
ClosedPublic

Authored by simoll on Jul 25 2019, 5:18 AM.

Details

Summary

This fixes B42473 and B42706.

This patch makes the SDA propagate branch divergence until the end of the RPO traversal. Before, the SyncDependenceAnalysis propagated divergence only until the IPD in rpo order. RPO is incompatible with post dominance in the presence of loops. This made the SDA crash because blocks were missed in the propagation.

Diff Detail

Event Timeline

simoll created this revision.Jul 25 2019, 5:18 AM

This needs a test. It should be possible to extract one from the bug reports?

foad added a comment.Jul 25 2019, 8:27 AM

I can confirm that this fixes the original test case that I had, that I reduced into bug 42706, and it doesn't seem to cause any other problems in my other test cases.

simoll updated this revision to Diff 211898.Jul 26 2019, 2:34 AM

Added b42473 r1.ll as a test case (failing assert on missing def at loop header).

foad accepted this revision.Aug 6 2019, 5:42 AM
This revision is now accepted and ready to land.Aug 6 2019, 5:42 AM
simoll updated this revision to Diff 216888.Aug 23 2019, 10:17 AM

Merged commits in preparation for landing

foad added a comment.Sep 17 2019, 9:06 AM

Ping! @simoll are you ready to land this now?

@foad Sorry for the delay. Feel free to commit on my behalf (i have been granted commit access but haven't found the time to set it up yet).

This revision was automatically updated to reflect the committed changes.