Page MenuHomePhabricator

[ADCE] Fix for non-determistic uselists after dead block removal

Authored by Gerolf on Jun 26 2019, 5:13 PM.



The order of blocks in BlocksWithDeadTerminators may impact uselists.
They can differ from run to run for the same input. The attached test case is
only meant to show the problem to anyone interested. It is not a test I plan to
commit, at least not in its current form.

Diff Detail

Event Timeline

Gerolf created this revision.Jun 26 2019, 5:13 PM
Herald added a project: Restricted Project. ยท View Herald TranscriptJun 26 2019, 5:13 PM
efriedma accepted this revision.Jun 28 2019, 2:28 PM
efriedma added a subscriber: efriedma.

Maybe worth explicitly mentioning in the commit message that AggressiveDeadCodeElimination::updateDeadRegions loops over BlocksWithDeadTerminators.

It's fine to commit non-determinism patches without a test, I think, because it's hard to write a useful regression test for these issues. I mean, you could theoretically CHECK the use-list itself, but that isn't really productive.

This revision is now accepted and ready to land.Jun 28 2019, 2:28 PM