This is an archive of the discontinued LLVM Phabricator instance.

[PM/LCG] Teach LCG to support spurious reference edges.
ClosedPublic

Authored by chandlerc on Feb 6 2017, 2:17 AM.

Details

Summary

Somewhat amazingly, this only requires teaching it to clean them up when
deleting a dead function from the graph. And we already have exactly the
necessary data structures to do that in the parent RefSCCs.

This allows ArgPromote to work in a much simpler way be merely letting
reference edges linger in the graph after the causing IR is deleted. We
will clean up these edges when we run any function pass over the IR, but
don't remove them eagerly.

This avoids all of the quadratic update issues both in the current pass
manager and in my previous attempt with the new pass manager.

Depends on D29577.

Event Timeline

chandlerc created this revision.Feb 6 2017, 2:17 AM
davide accepted this revision.Feb 7 2017, 11:39 AM

LGTM conditional to D29577 going in.

This revision is now accepted and ready to land.Feb 7 2017, 11:39 AM
This revision was automatically updated to reflect the committed changes.