This is an archive of the discontinued LLVM Phabricator instance.

[RS4GC] Fix hang on infinite loop
ClosedPublic

Authored by skatkov on Mar 22 2021, 1:37 AM.

Details

Summary

meetBDVState utility may sets the base pointer for the conflict state.
At this moment the base for conflict state does not have any meaning but
is used in comparison of BDV states. This comparison is used as an indicator
of progress done on iteration and RS4GC pass uses infinite loop to reach
fixed point.
As a result for added test on each iteration state for some phi nodes is updated
with other base value for conflict state and it indicates as a progress while
for conflict state there is no any progress more possible.
In reality the base value is transferred from one state to another and pass
detects the progress on these states.

The test is very fragile. The traversal order of states and operands of phi nodes
plays important role.

Diff Detail

Event Timeline

skatkov created this revision.Mar 22 2021, 1:37 AM
skatkov requested review of this revision.Mar 22 2021, 1:37 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 22 2021, 1:37 AM
reames accepted this revision.Mar 22 2021, 9:11 PM

LGTM

This revision is now accepted and ready to land.Mar 22 2021, 9:11 PM
This revision was automatically updated to reflect the committed changes.