This is an archive of the discontinued LLVM Phabricator instance.

[CSSPGO][SCCIterator] Fix a non-determinism in scc_member_iterator
ClosedPublic

Authored by hoy on Feb 28 2022, 11:28 AM.

Details

Summary

Previously we initialed the work queue with MST roots based on NodeInfoMap which is an unordered map. This could cause a non-determinism. I'm fixing this by initializing the queue based on SortedEdges.

I don't see any performance move with this change. However this helps debugging.

Diff Detail

Event Timeline

hoy created this revision.Feb 28 2022, 11:28 AM
hoy requested review of this revision.Feb 28 2022, 11:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 28 2022, 11:28 AM
hoy retitled this revision from [SCCIterator] Fix a non-determinism in scc_member_iterator to [CSSPGO][SCCIterator] Fix a non-determinism in scc_member_iterator.Feb 28 2022, 11:40 AM
hoy edited the summary of this revision. (Show Details)
hoy added reviewers: wenlei, wlei.
wenlei accepted this revision.Mar 7 2022, 11:39 PM

lgtm, thanks.

This revision is now accepted and ready to land.Mar 7 2022, 11:39 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 7 2022, 11:39 PM
This revision was landed with ongoing or failed builds.Mar 8 2022, 9:08 AM
This revision was automatically updated to reflect the committed changes.