[PATCH] D14596: [SROA] Choose more profitable type in findCommonType

Guozhi Wei via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 18 16:49:02 PST 2016


Carrot added a comment.

In http://reviews.llvm.org/D14596#356293, @chandlerc wrote:

> I think the biggest question left is the potential quadratic behavior:
>
> In http://reviews.llvm.org/D14596#349033, @Carrot wrote:
>
> > In http://reviews.llvm.org/D14596#347537, @majnemer wrote:
> >
> > > I think this can be N**2 if there is a big tree of phi nodes with bitcasts at different levels of the tree.  It might make sense to limit the total amount of work we are willing to do this combine.
> > >
> > > How many items of work does the worklist typically process before firing?
> >
> >
> > In the regression testing there are 1.01 PHI nodes added to the worklist in average, the maximum is 3.
>
>
> I think you should look at a substantially larger test than regression testing. For example, collecting the stats across a bootstrap of Clang itself at least?


In the bootstrap of clang, the average number of visited PHI nodes is 1.047, the maximum is 14.


http://reviews.llvm.org/D14596





More information about the llvm-commits mailing list