[llvm] r370056 - [DAGCombiner] Add node to the worklist in topological order in parallelizeChainedStores
Amaury Sechet via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 27 06:27:57 PDT 2019
Author: deadalnix
Date: Tue Aug 27 06:27:57 2019
New Revision: 370056
URL: http://llvm.org/viewvc/llvm-project?rev=370056&view=rev
Log:
[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
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=370056&r1=370055&r2=370056&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Tue Aug 27 06:27:57 2019
@@ -20707,11 +20707,11 @@ bool DAGCombiner::parallelizeChainedStor
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;
}
More information about the llvm-commits
mailing list