mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-15 12:09:51 +00:00
[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
This commit is contained in:
parent
d1c0f14be8
commit
ff6567cc77
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user