summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorAmaury Séchet <deadalnix@gmail.com>2019-12-02 19:13:38 +0100
committerAmaury Séchet <deadalnix@gmail.com>2019-12-17 18:26:16 +0100
commitff6567cc7720655de9d8731fb3005d1aaccec96a (patch)
tree699b8c41cd5881af9a0323d3f9e1adab4d07afbf /llvm/lib/CodeGen/SelectionDAG
parentd1c0f14be8a7d1337712ff1cf0bcdd33e2f78316 (diff)
downloadbcm5719-llvm-ff6567cc7720655de9d8731fb3005d1aaccec96a.tar.gz
bcm5719-llvm-ff6567cc7720655de9d8731fb3005d1aaccec96a.zip
[DAGCombiner] Add node back in the worklist in topological order in CommitTargetLoweringOpt
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. Reviewers: craig.topper, efriedma, RKSimon, lebedev.ri Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70921
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index f3d8d3bce94..11756bb0ebb 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -1035,8 +1035,7 @@ CommitTargetLoweringOpt(const TargetLowering::TargetLoweringOpt &TLO) {
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
OpenPOWER on IntegriCloud