[PATCH] D61511: [DAGCombiner] Limit number of nodes explored as store candidates.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 9 10:03:37 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL360357: [DAGCombiner] Limit number of nodes explored as store candidates. (authored by fhahn, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D61511?vs=198324&id=198863#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61511/new/
https://reviews.llvm.org/D61511
Files:
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Index: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -14857,9 +14857,11 @@
RootNode = St->getChain().getNode();
+ unsigned NumNodesExplored = 0;
if (LoadSDNode *Ldn = dyn_cast<LoadSDNode>(RootNode)) {
RootNode = Ldn->getChain().getNode();
- for (auto I = RootNode->use_begin(), E = RootNode->use_end(); I != E; ++I)
+ for (auto I = RootNode->use_begin(), E = RootNode->use_end();
+ I != E && NumNodesExplored < 1024; ++I, ++NumNodesExplored)
if (I.getOperandNo() == 0 && isa<LoadSDNode>(*I)) // walk down chain
for (auto I2 = (*I)->use_begin(), E2 = (*I)->use_end(); I2 != E2; ++I2)
if (I2.getOperandNo() == 0)
@@ -14870,7 +14872,8 @@
StoreNodes.push_back(MemOpLink(OtherST, PtrDiff));
}
} else
- for (auto I = RootNode->use_begin(), E = RootNode->use_end(); I != E; ++I)
+ for (auto I = RootNode->use_begin(), E = RootNode->use_end();
+ I != E && NumNodesExplored < 1024; ++I, ++NumNodesExplored)
if (I.getOperandNo() == 0)
if (StoreSDNode *OtherST = dyn_cast<StoreSDNode>(*I)) {
BaseIndexOffset Ptr;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61511.198863.patch
Type: text/x-patch
Size: 1322 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190509/46988a91/attachment.bin>
More information about the llvm-commits
mailing list