This is an archive of the discontinued LLVM Phabricator instance.

[CallGraphUpdater] Properly remove strongly connected components (old PM)
ClosedPublic

Authored by jdoerfert on Apr 12 2020, 9:59 AM.

Details

Summary

The old code did eliminate references from and to functions that were
about to be deleted only just before we deleted them. This can cause
references from other functions that are supposed to be deleted to still
exist, depending on the order. If the functions form a strongly
connected component the problem manifests regardless of the order in
which we try to actually delete the functions.

This patch introduces a two step deletion. First we remove all
references and then we delete the function. Note that this only affects
the old call graph. There should not be any functional changes if no old
style call graph was given.

To test this we delete two strongly connected functions instead of one
in an existing test.

Diff Detail

Event Timeline

jdoerfert created this revision.Apr 12 2020, 9:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 12 2020, 9:59 AM
jdoerfert retitled this revision from [CallGraphUpdater] Properly remove strongly connected components (oldPM) to [CallGraphUpdater] Properly remove strongly connected components (old PM).Apr 12 2020, 10:02 AM

I accidentally influenced an existing test, will address this.

jdoerfert updated this revision to Diff 256893.Apr 12 2020, 4:54 PM

Avoid affecting other tests

hfinkel accepted this revision.Apr 13 2020, 9:26 AM

LGTM

This revision is now accepted and ready to land.Apr 13 2020, 9:26 AM
This revision was automatically updated to reflect the committed changes.