summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmaury Sechet <deadalnix@gmail.com>2019-08-27 13:27:57 +0000
committerAmaury Sechet <deadalnix@gmail.com>2019-08-27 13:27:57 +0000
commitf28dee2cff8609f45e9597c18b086fe492829573 (patch)
tree46e8f342cd70f55d5e3161da26dc5cde2c8c35a6
parent8912e2af3951704b1b8fb05d579ee1dd0a4c263e (diff)
downloadbcm5719-llvm-f28dee2cff8609f45e9597c18b086fe492829573.tar.gz
bcm5719-llvm-f28dee2cff8609f45e9597c18b086fe492829573.zip
[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
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 9037adea356..eea22e220f1 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -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;
}
OpenPOWER on IntegriCloud