subreg: Add -fsplit-wide-types-early (PR88233)
authorSegher Boessenkool <segher@kernel.crashing.org>
Mon, 8 Jul 2019 17:35:12 +0000 (19:35 +0200)
committerSegher Boessenkool <segher@gcc.gnu.org>
Mon, 8 Jul 2019 17:35:12 +0000 (19:35 +0200)
commitb18081df8cca5f2306e99709fa2c06b9cbeea8d0
tree59ef6d36e481b583dd0009cdd57c64508448c61e
parent8f783191775bc266a74175e92c7eb64098bd4283
subreg: Add -fsplit-wide-types-early (PR88233)

Currently the second lower-subreg pass is run right before RA.  This
is much too late to be very useful.  At least for targets that do not
have RTL patterns for operations on multi-register modes it is a lot
better to split patterns earlier, before combine and all related
passes.

This adds an option -fsplit-wide-types-early that does that, and
enables it by default for rs6000.

PR rtl-optimization/88233
* common.opt (fsplit-wide-types-early): New option.
* common/config/rs6000/rs6000-common.c
(rs6000_option_optimization_table): Add OPT_fsplit_wide_types_early for
OPT_LEVELS_ALL.
* doc/invoke.texi (Optimization Options): Add -fsplit-wide-types-early.
* lower-subreg.c (pass_lower_subreg2::gate): Add test for
flag_split_wide_types_early.
(pass_data_lower_subreg3): New.
(pass_lower_subreg3): New.
(make_pass_lower_subreg3): New.
* passes.def (pass_lower_subreg2): Move after the loop passes.
(pass_lower_subreg3): New, inserted where pass_lower_subreg2 was.
* tree-pass.h (make_pass_lower_subreg2): Move up, to its new place in
the pass pipeline; its previous place is taken by ...
(make_pass_lower_subreg3): ... this.

From-SVN: r273240
gcc/ChangeLog
gcc/common.opt
gcc/common/config/rs6000/rs6000-common.c
gcc/doc/invoke.texi
gcc/lower-subreg.c
gcc/passes.def
gcc/tree-pass.h