This is an archive of the discontinued LLVM Phabricator instance.

[ScheduleDAG] Fix unfolding of SUnits to already existent nodes.
ClosedPublic

Authored by niravd on Jun 27 2018, 12:13 PM.

Details

Summary

If unfolding an SUnit results in both load or the operation using it which
already exist in the DAG, abort the unfold if they are already scheduled.
If not, make sure we don't add duplicate dependencies.

This fixes PR37916.

Diff Detail

Repository
rL LLVM

Event Timeline

niravd created this revision.Jun 27 2018, 12:13 PM
efriedma accepted this revision.Jul 17 2018, 12:28 PM
efriedma added a subscriber: efriedma.

LGTM with one nit

llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
1013 ↗(On Diff #153150)

Please add a comment here noting that we specifically end up in this situation when isNewLoad == false.

This revision is now accepted and ready to land.Jul 17 2018, 12:28 PM
This revision was automatically updated to reflect the committed changes.