This is an archive of the discontinued LLVM Phabricator instance.

[DAGCombiner] Add node back in the worklist in topological order in CommitTargetLoweringOpt
ClosedPublic

Authored by deadalnix on Dec 2 2019, 1:13 PM.

Details

Summary

Right now, DAGCombiner process the nodes in an iplementation defined order. This tends to be fragile as optimisation may or may not kick in depending on the traversal order.

This is part of a larger effort to get the DAGCombiner to process its node in topological order.

Event Timeline

deadalnix created this revision.Dec 2 2019, 1:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 2 2019, 1:13 PM
deadalnix updated this revision to Diff 232843.Dec 9 2019, 6:55 AM

Ping, rebase

lebedev.ri accepted this revision.Dec 9 2019, 12:19 PM

... where AddToWorklistWithUsers() calls those two functions in the opposite order.
Looks ok to me. Might be good to have a test case, but i don't expect that it would be easy to produce one.

This revision is now accepted and ready to land.Dec 9 2019, 12:19 PM
This revision was automatically updated to reflect the committed changes.