[PATCH] D33587: [DAGCombine] Do several rounds of combine.

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 1 14:48:07 PDT 2017


davide added a comment.

In https://reviews.llvm.org/D33587#770721, @deadalnix wrote:

> @inouehrs That wouldn't be the same as this will bail when no more combine is found.
>  @davide It's more like 3% as far as I can tell. The sad truth here, looking into it, is that there are a lot of combine that and undo themselves and most of the perf hit come from there. These transform are the very reason why i limited the number of iterations to begin with.
>
> As far as benefit goes, it's very helpful for code that's legalized. I've been caring about this a lot lately, because I have workload that involve a lot of cryptography, and the gains are pretty substancial. In addition, I have various transform that I haven't published yet because they simply cannot kick in reliably without the mechanism in this diff. Any pattern that match over more than 2 level deep suffer from not having this patch.
>
> One things that could be done is to only enable this when optimizations are on. We can then weed out the case that loop over time and enable it consistently when there are not so many of them anymore.


This wouldn't actually help the worst case, i.e. LTO, when optimizations are almost always on.
I think the impact is still quite significant, and we should have numbers before trying to be more aggressive, as SelectionDAG is already very expensive.


https://reviews.llvm.org/D33587





More information about the llvm-commits mailing list