Add unroll and jam pass
authorMichael Matz <matz@suse.de>
Thu, 7 Dec 2017 14:49:54 +0000 (14:49 +0000)
committerMichael Matz <matz@gcc.gnu.org>
Thu, 7 Dec 2017 14:49:54 +0000 (14:49 +0000)
commit1cc521f1a824b5913aeda06ebe296de98f2d9453
tree906285fc77b9852eb7e207a988b9d0144496c8b1
parent5a40ae3c3acf7eaabc9599f5701adbd2f6ec607e
Add unroll and jam pass

* gimple-loop-jam.c: New file.
* Makefile.in (OBJS): Add gimple-loop-jam.o.
* common.opt (funroll-and-jam): New option.
* opts.c (default_options_table): Add unroll-and-jam at -O3.
* params.def (PARAM_UNROLL_JAM_MIN_PERCENT): New param.
(PARAM_UNROLL_JAM_MAX_UNROLL): Ditto.
* passes.def: Add pass_loop_jam.
* timevar.def (TV_LOOP_JAM): Add.
* tree-pass.h (make_pass_loop_jam): Declare.
* cfgloop.c (flow_loop_tree_node_add): Add AFTER argument.
* cfgloop.h (flow_loop_tree_node_add): Adjust declaration.
* cfgloopmanip.c (duplicate_loop): Add AFTER argument, adjust call
to flow_loop_tree_node_add.
(duplicate_subloops, copy_loops_to): Append to sibling list.
* cfgloopmanip.h: (duplicate_loop): Adjust declaration.
* doc/invoke.texi (-funroll-and-jam): Document new option.
(unroll-jam-min-percent, unroll-jam-max-unroll): Document new params.

testsuite/
* gcc.dg/unroll-and-jam.c: New test.

From-SVN: r255467
16 files changed:
gcc/ChangeLog
gcc/Makefile.in
gcc/cfgloop.c
gcc/cfgloop.h
gcc/cfgloopmanip.c
gcc/cfgloopmanip.h
gcc/common.opt
gcc/doc/invoke.texi
gcc/gimple-loop-jam.c [new file with mode: 0644]
gcc/opts.c
gcc/params.def
gcc/passes.def
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/unroll-and-jam.c [new file with mode: 0644]
gcc/timevar.def
gcc/tree-pass.h