This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH GCC]Introduce loop interchange pass and enable it at -O3
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Bin Cheng <Bin dot Cheng at arm dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, nd <nd at arm dot com>
- Date: Thu, 7 Dec 2017 12:39:27 +0100
- Subject: Re: [PATCH GCC]Introduce loop interchange pass and enable it at -O3
- Authentication-results: sourceware.org; auth=none
- References: <DB5PR0801MB274202706848F062DFABC675E7330@DB5PR0801MB2742.eurprd08.prod.outlook.com>
On Thu, Dec 7, 2017 at 11:28 AM, Bin Cheng <Bin.Cheng@arm.com> wrote:
> Hi,
> This is the overall loop interchange patch on gimple-linterchange branch. Note the new pass
> is enabled at -O3 level by default. Bootstrap and regtest on x86_64 and AArch64(ongoing).
> NOte after cost model change it is now far more conservative than original version. It only
> interchanges 11 loops in spec2k6 (416 doesn't build at the moment), vs ~250 for the original
> version. I will collect compilation time data, though there shouldn't be any surprise given
> few loops are actually interchanged. I will also collect spec2k6 data, shouldn't affect cases
> other than bwaves either.
> So is it OK?
Please omit the no longer needed change to gsi_remove in
gimple-iterator.[ch]. The new
--params need documenting in invoke.texi.
Ok with those changes.
Thanks!
Richard.
> Thanks,
> bin
> 2017-12-07 Bin Cheng <bin.cheng@arm.com>
> Richard Biener <rguenther@suse.de>
>
> 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
> 2017-12-07 Bin Cheng <bin.cheng@arm.com>
> Richard Biener <rguenther@suse.de>
>
> PR tree-optimization/81303
> * 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.