[PATCH] D8943: Calculate vectorization factor using the narrowest type instead of widest type

Cong Hou via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 14 15:27:12 PDT 2015


congh added a comment.

In http://reviews.llvm.org/D8943#267443, @spatel wrote:

> In http://reviews.llvm.org/D8943#266404, @congh wrote:
>
> > In http://reviews.llvm.org/D8943#260101, @spatel wrote:
> >
> > > F909822: vecfactor - perf.csv <http://reviews.llvm.org/F909822>
> > >
> > > I applied this patch on top of r248957 and ran the benchmarking subset of test-suite on an AMD Jaguar 1.5 GHz + Ubuntu 14.04 test system. The baseline is -O3 -march=btver2 while the comparison run added -mllvm -vectorizer-maximize-bandwidth (data attached).
> > >
> > > I see very little performance difference on any test: almost everything is +/- 2% which is within the noise for most tests.
> > >
> > > Cong, I would be interested to know if you saw any large diffs on these tests on your test system or if the bigger wins/losses all occurred on the non-benchmarking tests in test-suite?
> >
> >
> > Thank you for the performance test! I think there may be two reasons that why we could not observe big performance difference in llvm test suite:
> >
> > 1. There is no hotspot that includes a loop with types of different sizes (this is what this patch is optimizing).
> > 2. There are some problems with the cost model in llvm. Even we can choose a larger VF, the cost model shows that the larger VF has the larger cost. I will deal with this issue later.
> >
> >   I don't have a test in my codebase that benefits from this patch, but it is quite easy to synthesize one:
>
>
> Thanks, Cong. I am confused by the above statement versus your earlier one:
>  "For all 498 test cases in the test suite, the average speed-up is 6.66% with this patch. There are several significant performance changes (>100%) and most are positive. I will keep investigating those significant negative changes."
>
> Did something in the patch or external code change such that there used to be significant performance changes but now there are not?


Sorry for forgetting to clarify on this. After investigating those test results, I found that many large numbers are due to flaky tests. Many tests enjoying 5+% speed-up even don't have any change to be vectorized. However, I think your test results make more sense. So do you want me to do those tests again on my machine?


http://reviews.llvm.org/D8943





More information about the llvm-commits mailing list