Page MenuHomePhabricator

Enable vectorizer-maximize-bandwidth by default.
ClosedPublic

Authored by danielcdh on May 18 2017, 2:44 PM.

Details

Summary

vectorizer-maximize-bandwidth is generally useful in terms of performance. I've tested the impact of changing this to default on speccpu benchmarks on sandybridge machines. The result shows non-negative impact:

spec/2006/fp/C++/444.namd 26.84 -0.31%
spec/2006/fp/C++/447.dealII 46.19 +0.89%
spec/2006/fp/C++/450.soplex 42.92 -0.44%
spec/2006/fp/C++/453.povray 38.57 -2.25%
spec/2006/fp/C/433.milc 24.54 -0.76%
spec/2006/fp/C/470.lbm 41.08 +0.26%
spec/2006/fp/C/482.sphinx3 47.58 -0.99%
spec/2006/int/C++/471.omnetpp 22.06 +1.87%
spec/2006/int/C++/473.astar 22.65 -0.12%
spec/2006/int/C++/483.xalancbmk 33.69 +4.97%
spec/2006/int/C/400.perlbench 33.43 +1.70%
spec/2006/int/C/401.bzip2 23.02 -0.19%
spec/2006/int/C/403.gcc 32.57 -0.43%
spec/2006/int/C/429.mcf 40.35 +0.27%
spec/2006/int/C/445.gobmk 26.96 +0.06%
spec/2006/int/C/456.hmmer 24.4 +0.19%
spec/2006/int/C/458.sjeng 27.91 -0.08%
spec/2006/int/C/462.libquantum 57.47 -0.20%
spec/2006/int/C/464.h264ref 46.52 +1.35%

geometric mean +0.29%

The regression on 453.povray seems real, but is due to secondary effects as all hot functions are bit-identical with and without the flag.

I started this patch to consult upstream opinions on this. It will be greatly appreciated if the community can help test the performance impact of this change on other architectures so that we can decided if this should be target-dependent.

Event Timeline

danielcdh created this revision.May 18 2017, 2:44 PM
chandlerc edited edge metadata.May 18 2017, 3:15 PM

To get more feedback, you might want to send an llvm-dev email with the benchmark data you have and ask others to benchmark by passing the flag there? More folks would see that email, and you can point at this patch as a place to have detailed discussion.

Also, while I don't really expect it, have you looked at any code size changes? Might be good just to check off the list.

we're seeing nice improvements but also significant degradations, which we would like to investigate before the patch is committed.

dorit added a subscriber: dorit.May 30 2017, 12:49 AM

we're seeing nice improvements but also significant degradations, which we would like to investigate before the patch is committed.

Please follow up on the llvm-dev thread?

Specifically, if you want this change to be delayed, it seems important to provide test cases that reproduce whatever issue you're seeing as no one else has reported issues.

bjope added a subscriber: bjope.May 30 2017, 2:28 PM
davidxl edited edge metadata.Jun 13 2017, 10:44 AM

Any update on this patch?

chandlerc accepted this revision.Jun 13 2017, 11:02 AM

Any update on this patch?

Dehao indicated on the llvm-dev thread that he planned to land it by end of day today unless someone else hit issues. Marking as LGTM just as a formality...

This revision is now accepted and ready to land.Jun 13 2017, 11:02 AM

As discussed in llvm-dev:

"Thanks for the update. I think overall consensus is supportive for this change. If no one objects by then end of tomorrow (Tuesday), I will submit the patch to make vectorizer-maximize-bandwidth on by default."

Could someone help approve the patch so that I can "arc commit" directly Wednesday (6/14/2017) morning?

Thanks,
Dehao

Any update on this patch?

Dehao indicated on the llvm-dev thread that he planned to land it by end of day today unless someone else hit issues. Marking as LGTM just as a formality...

Thanks Chandler!

danielcdh updated this revision to Diff 102597.Jun 14 2017, 1:02 PM

update tests. PTAL. Thanks!

chandlerc accepted this revision.Jun 21 2017, 12:58 PM

I thought I had been clear, sorry if not. This LGTM based on the llvm-dev discussion, please go ahead. =]

danielcdh closed this revision.Jun 21 2017, 3:02 PM
danielcdh reopened this revision.Jun 26 2017, 1:09 PM

The patch was reverted in r305990 because it exposed a aarch64 bug. A fix has been proposed in https://reviews.llvm.org/D34641

This revision is now accepted and ready to land.Jun 26 2017, 1:09 PM
danielcdh closed this revision.Jun 26 2017, 2:34 PM
danielcdh reopened this revision.Jun 26 2017, 2:39 PM

Accidentally closed it.

Have the exposed bug(https://bugs.llvm.org/show_bug.cgi?id=33600) fixed in r306334

Now I'm retesting this patch and prepare to commit again.

This revision is now accepted and ready to land.Jun 26 2017, 2:39 PM
danielcdh closed this revision.Jun 26 2017, 2:41 PM