[PATCH] D70921: [DAGCombiner] Add node back in the worklist in topological order in CommitTargetLoweringOpt
Amaury SECHET via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 2 13:15:11 PST 2019
deadalnix created this revision.
deadalnix added reviewers: craig.topper, efriedma, RKSimon, lebedev.ri.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D70921
Files:
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
===================================================================
--- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -1035,8 +1035,7 @@
DAG.ReplaceAllUsesOfValueWith(TLO.Old, TLO.New);
// Push the new node and any (possibly new) users onto the worklist.
- AddToWorklist(TLO.New.getNode());
- AddUsersToWorklist(TLO.New.getNode());
+ AddToWorklistWithUsers(TLO.New.getNode());
// Finally, if the node is now dead, remove it from the graph. The node
// may not be dead if the replacement process recursively simplified to
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70921.231769.patch
Type: text/x-patch
Size: 647 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191202/6a0aad99/attachment.bin>
More information about the llvm-commits
mailing list