[PATCH] D65174: [DAGCombine] Limit the number of times for a store being considered for merging
Nirav Dave via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 31 11:01:12 PDT 2019
niravd added inline comments.
================
Comment at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:869
+ /// whether the searching bails out.
static bool hasPredecessorHelper(const SDNode *N,
SmallPtrSetImpl<const SDNode *> &Visited,
----------------
Visited.size() and maxsteps are in scope for any call of the help. Just do the comparision at the call point instead of adding an argument.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:15446
+ SDNode *RootNode) -> bool {
+ return false;
+ auto RootCount = StoreRootCountMap.find(StoreNode);
----------------
Extraneous return false here.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:15560
+ if (BailOut) {
+ auto &RootCount = StoreRootCountMap[StoreNodes[i].MemNode];
+ RootCount = {RootNode, RootCount.second + 1};
----------------
Shouldn't you be checking that RootNode matches before you increment the count?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65174/new/
https://reviews.llvm.org/D65174
More information about the llvm-commits
mailing list