[PATCH] D65174: [DAGCombine] Limit the number of times for a store being considered for merging

Wei Mi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 29 12:45:35 PDT 2019


wmi added a comment.

In D65174#1604955 <https://reviews.llvm.org/D65174#1604955>, @niravd wrote:

> > I check and the reason the candidates cannot be merged isn't because of the legal size. It is that checkMergeStoreCandidatesForDependencies always returns false so https://reviews.llvm.org/D60133 doesn't help.
>
> Ah! Interesting. I've only seen that dependence triggered from inlined memcpy.
>
> What's the shape of the DAG here? There must be some non-standard data dependence between stores, which is not being checked. Maybe we can change the candidate search to avoid such candidates.


The DAG is huge and I havn't seen any speciality. About the dependence between stores, I look into it and checkMergeStoreCandidatesForDependencies always returns false because llvm::SDNode::hasPredecessorHelper visits too many nodes in the worklist which exceeds the MaxSteps and the function bails out. That is also the reason the compile time increases so much.


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