Add unroll and jam pass

Programming / Compilers / GCC - matz [138bc75d-0d04-0410-961f-82ee72b054a4] - 7 December 2017 14:49 EST

- 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.

baf1c4a625d Add unroll and jam pass
gcc/ChangeLog | 22 ++
gcc/Makefile.in | 1 +
gcc/cfgloop.c | 20 +-
gcc/cfgloop.h | 3 +-
gcc/cfgloopmanip.c | 47 ++-
gcc/cfgloopmanip.h | 3 +-
gcc/common.opt | 4 +
gcc/doc/invoke.texi | 16 +-
gcc/gimple-loop-jam.c | 569 ++++++++++++++++++++++++++++++++++
gcc/opts.c | 1 +
gcc/params.def | 10 +
gcc/passes.def | 1 +
gcc/testsuite/ChangeLog | 4 +
gcc/testsuite/gcc.dg/unroll-and-jam.c | 111 +++++++
gcc/timevar.def | 1 +
gcc/tree-pass.h | 1 +
16 files changed, 790 insertions(+), 24 deletions(-)

Upstream: gcc.gnu.org


  • Share