[DAGCombiner] Add node to the worklist in topological order in parallelizeChainedStores

Summary: As per title.

Reviewers: craig.topper, efriedma, RKSimon, lebedev.ri

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D66659

llvm-svn: 370056
This commit is contained in:
Amaury Sechet 2019-08-27 13:27:57 +00:00
parent 8912e2af39
commit f28dee2cff
1 changed files with 4 additions and 4 deletions

View File

@ -20707,11 +20707,11 @@ bool DAGCombiner::parallelizeChainedStores(StoreSDNode *St) {
SDValue TF = DAG.getTokenFactor(SDLoc(STChain), TFOps);
CombineTo(St, TF);
AddToWorklist(STChain);
// Add TF operands worklist in reverse order.
for (auto I = TF->getNumOperands(); I;)
AddToWorklist(TF->getOperand(--I).getNode());
// Add TF and its operands to the worklist.
AddToWorklist(TF.getNode());
for (const SDValue &Op : TF->ops())
AddToWorklist(Op.getNode());
AddToWorklist(STChain);
return true;
}