[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:49:42 PDT 2019


wmi added a comment.

In D65174#1604984 <https://reviews.llvm.org/D65174#1604984>, @fhahn wrote:

> > Recently we run into a case with compile time problem (27 mins in O3 <https://reviews.llvm.org/owners/package/3/> but a few seconds in O0). In that case, we have a huge block containing many stores. Each time a store is visited, dagcombiner will find a candidate set all chained by the same root node for the store, then try to merge the nodes in the candidate set into a wider store. This is a quadratic algorithm, because for the same candidate set, everytime a store inside of the set is visited, the same set will be considered for merging.
>
> Could you share the test case? I looked into a similar issue and came up with some sort of caching for the lookup. I never shared the patch, because we addressed the issue with a limit. But it might be helpful for your case.


Good to know that. It is an internal source and I don't have tool to do obfuscation. Could you share your patch? I can try it out and see if it helps.


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