re PR tree-optimization/81303 (410.bwaves regression caused by r249919)
authorBin Cheng <bin.cheng@arm.com>
Thu, 7 Dec 2017 18:03:53 +0000 (18:03 +0000)
committerBin Cheng <amker@gcc.gnu.org>
Thu, 7 Dec 2017 18:03:53 +0000 (18:03 +0000)
commitfbdec14e80e9399cd301ed30340268bdc5b5c2eb
tree6174dc33b68cbeea645678d9d23bde9cd4603643
parent75214935bee043e659ca7172a84451ded10e8987
re PR tree-optimization/81303 (410.bwaves regression caused by r249919)

PR tree-optimization/81303
* Makefile.in (gimple-loop-interchange.o): New object file.
* common.opt (floop-interchange): Reuse the option from graphite.
* doc/invoke.texi (-floop-interchange): Ditto.  New document for
-floop-interchange and mention it for -O3.
* opts.c (default_options_table): Enable -floop-interchange at -O3.
* gimple-loop-interchange.cc: New file.
* params.def (PARAM_LOOP_INTERCHANGE_MAX_NUM_STMTS): New parameter.
(PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): New parameter.
* passes.def (pass_linterchange): New pass.
* timevar.def (TV_LINTERCHANGE): New time var.
* tree-pass.h (make_pass_linterchange): New declaration.
* tree-ssa-loop-ivcanon.c (create_canonical_iv): Change to external
interchange.  Record IV before/after increment in new parameters.
* tree-ssa-loop-ivopts.h (create_canonical_iv): New declaration.
* tree-vect-loop.c (vect_is_simple_reduction): Factor out reduction
path check into...
(check_reduction_path): ...New function here.
* tree-vectorizer.h (check_reduction_path): New declaration.

gcc/testsuite
* gcc.dg/tree-ssa/loop-interchange-1.c: New test.
* gcc.dg/tree-ssa/loop-interchange-1b.c: New test.
* gcc.dg/tree-ssa/loop-interchange-2.c: New test.
* gcc.dg/tree-ssa/loop-interchange-3.c: New test.
* gcc.dg/tree-ssa/loop-interchange-4.c: New test.
* gcc.dg/tree-ssa/loop-interchange-5.c: New test.
* gcc.dg/tree-ssa/loop-interchange-6.c: New test.
* gcc.dg/tree-ssa/loop-interchange-7.c: New test.
* gcc.dg/tree-ssa/loop-interchange-8.c: New test.
* gcc.dg/tree-ssa/loop-interchange-9.c: New test.
* gcc.dg/tree-ssa/loop-interchange-10.c: New test.
* gcc.dg/tree-ssa/loop-interchange-11.c: New test.
* gcc.dg/tree-ssa/loop-interchange-12.c: New test.
* gcc.dg/tree-ssa/loop-interchange-13.c: New test.

Co-Authored-By: Richard Biener <rguenther@suse.de>
From-SVN: r255472
29 files changed:
gcc/ChangeLog
gcc/Makefile.in
gcc/common.opt
gcc/doc/invoke.texi
gcc/gimple-loop-interchange.cc [new file with mode: 0644]
gcc/opts.c
gcc/params.def
gcc/passes.def
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-10.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-11.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-12.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-13.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-1b.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-5.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-6.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-7.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-8.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-9.c [new file with mode: 0644]
gcc/timevar.def
gcc/tree-pass.h
gcc/tree-ssa-loop-ivcanon.c
gcc/tree-ssa-loop-ivopts.h
gcc/tree-vect-loop.c
gcc/tree-vectorizer.h