+2019-07-08 Segher Boessenkool <segher@kernel.crashing.org>
+
+ 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.
+
2019-07-08 Robin Dapp <rdapp@linux.ibm.com>
* config/s390/s390.c (s390_shift_truncation_mask): Define.
Common Report Var(flag_split_wide_types) Optimization
Split wide types into independent registers.
+fsplit-wide-types-early
+Common Report Var(flag_split_wide_types_early) Optimization
+Split wide types into independent registers earlier.
+
fssa-backprop
Common Report Var(flag_ssa_backprop) Init(1) Optimization
Enable backward propagation of use properties at the SSA level.
/* Implement TARGET_OPTION_OPTIMIZATION_TABLE. */
static const struct default_options rs6000_option_optimization_table[] =
{
+ /* Split multi-word types early. */
+ { OPT_LEVELS_ALL, OPT_fsplit_wide_types_early, NULL, 1 },
/* Enable -fsched-pressure for first pass instruction scheduling. */
{ OPT_LEVELS_1_PLUS, OPT_fsched_pressure, NULL, 1 },
{ OPT_LEVELS_NONE, 0, NULL, 0 }
-fsignaling-nans @gol
-fsingle-precision-constant -fsplit-ivs-in-unroller -fsplit-loops@gol
-fsplit-paths @gol
--fsplit-wide-types -fssa-backprop -fssa-phiopt @gol
+-fsplit-wide-types -fsplit-wide-types-early -fssa-backprop -fssa-phiopt @gol
-fstdarg-opt -fstore-merging -fstrict-aliasing @gol
-fthread-jumps -ftracer -ftree-bit-ccp @gol
-ftree-builtin-call-dce -ftree-ccp -ftree-ch @gol
Enabled at levels @option{-O}, @option{-O2}, @option{-O3},
@option{-Os}.
+@item -fsplit-wide-types-early
+@opindex fsplit-wide-types-early
+Fully split wide types early, instead of very late.
+This option has no effect unless @option{-fsplit-wide-types} is turned on.
+
+This is the default on some targets.
+
@item -fcse-follow-jumps
@opindex fcse-follow-jumps
In common subexpression elimination (CSE), scan through jump instructions
{}
/* opt_pass methods: */
- virtual bool gate (function *) { return flag_split_wide_types != 0; }
+ virtual bool gate (function *) { return flag_split_wide_types
+ && flag_split_wide_types_early; }
virtual unsigned int execute (function *)
{
decompose_multiword_subregs (true);
{
return new pass_lower_subreg2 (ctxt);
}
+
+/* Implement third lower subreg pass. */
+
+namespace {
+
+const pass_data pass_data_lower_subreg3 =
+{
+ RTL_PASS, /* type */
+ "subreg3", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
+ TV_LOWER_SUBREG, /* tv_id */
+ 0, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ TODO_df_finish, /* todo_flags_finish */
+};
+
+class pass_lower_subreg3 : public rtl_opt_pass
+{
+public:
+ pass_lower_subreg3 (gcc::context *ctxt)
+ : rtl_opt_pass (pass_data_lower_subreg3, ctxt)
+ {}
+
+ /* opt_pass methods: */
+ virtual bool gate (function *) { return flag_split_wide_types
+ && !flag_split_wide_types_early; }
+ virtual unsigned int execute (function *)
+ {
+ decompose_multiword_subregs (true);
+ return 0;
+ }
+
+}; // class pass_lower_subreg3
+
+} // anon namespace
+
+rtl_opt_pass *
+make_pass_lower_subreg3 (gcc::context *ctxt)
+{
+ return new pass_lower_subreg3 (ctxt);
+}
NEXT_PASS (pass_rtl_doloop);
NEXT_PASS (pass_rtl_loop_done);
POP_INSERT_PASSES ()
+ NEXT_PASS (pass_lower_subreg2);
NEXT_PASS (pass_web);
NEXT_PASS (pass_rtl_cprop);
NEXT_PASS (pass_cse2);
NEXT_PASS (pass_partition_blocks);
NEXT_PASS (pass_outof_cfg_layout_mode);
NEXT_PASS (pass_split_all_insns);
- NEXT_PASS (pass_lower_subreg2);
+ NEXT_PASS (pass_lower_subreg3);
NEXT_PASS (pass_df_initialize_no_opt);
NEXT_PASS (pass_stack_ptr_mod);
NEXT_PASS (pass_mode_switching);
extern rtl_opt_pass *make_pass_rtl_doloop (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_rtl_loop_done (gcc::context *ctxt);
+extern rtl_opt_pass *make_pass_lower_subreg2 (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_web (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_cse2 (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_df_initialize_opt (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_match_asm_constraints (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_split_all_insns (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_fast_rtl_byte_dce (gcc::context *ctxt);
-extern rtl_opt_pass *make_pass_lower_subreg2 (gcc::context *ctxt);
+extern rtl_opt_pass *make_pass_lower_subreg3 (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_mode_switching (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_sms (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_sched (gcc::context *ctxt);