OSDN Git Service

Enable vectorizer-maximize-bandwidth by default.
authorDehao Chen <dehao@google.com>
Wed, 21 Jun 2017 22:01:32 +0000 (22:01 +0000)
committerDehao Chen <dehao@google.com>
Wed, 21 Jun 2017 22:01:32 +0000 (22:01 +0000)
commit998914d3010de151a99ac385ad0bfa786404c9da
tree7e4919cd436400afd645e4d00f4b6c27cc310277
parent225f28a6dba73c949d20441d20339ecbb65ab9cb
Enable vectorizer-maximize-bandwidth by default.

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.

Reviewers: hfinkel, mkuper, davidxl, chandlerc

Reviewed By: chandlerc

Subscribers: rengolin, sanjoy, javed.absar, bjope, dorit, magabari, RKSimon, llvm-commits, mzolotukhin

Differential Revision: https://reviews.llvm.org/D33341

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305960 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
lib/Transforms/Vectorize/LoopVectorize.cpp
test/Transforms/LoopVectorize/AArch64/loop-vectorization-factors.ll
test/Transforms/LoopVectorize/AArch64/reduction-small-size.ll
test/Transforms/LoopVectorize/ARM/gcc-examples.ll
test/Transforms/LoopVectorize/X86/fp64_to_uint32-cost-model.ll
test/Transforms/LoopVectorize/X86/gcc-examples.ll
test/Transforms/LoopVectorize/X86/masked_load_store.ll
test/Transforms/LoopVectorize/X86/no_fpmath.ll
test/Transforms/LoopVectorize/X86/no_fpmath_with_hotness.ll
test/Transforms/LoopVectorize/X86/reduction-crash.ll
test/Transforms/LoopVectorize/X86/vectorization-remarks-loopid-dbg.ll
test/Transforms/LoopVectorize/X86/vectorization-remarks.ll