This is an archive of the discontinued LLVM Phabricator instance.

Fix problem with SCC sort
Needs ReviewPublic

Authored by andrew.w.kaylor on Aug 14 2023, 5:17 PM.

Details

Reviewers
hoy
wenlei
Summary

This patch fixes a minor problem with SCC sorting wherein a value is compared to itself. The problem has been present since this code was introduced in D114204. It appears to be a simple typo.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptAug 14 2023, 5:17 PM
andrew.w.kaylor requested review of this revision.Aug 14 2023, 5:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 14 2023, 5:17 PM
arsenm added a subscriber: arsenm.Aug 14 2023, 6:34 PM

lgtm but is a test possible?

lgtm but is a test possible?

I would guess that it is possible to write a test for this, but I don't know this code well enough to do it. When this code was added, llvm/test/Transforms/SampleProfile/profile-context-order.ll was updated to test it, but clearly that update to the test didn't depend on this comparison. Perhaps @hoy could suggest a test?