View | Details | Return to bug 92046
Collapse All | Expand All

(-)gcc/opts.c (-18 lines)
Lines 1123-1146 finish_options (struct gcc_options *opts Link Here
1123
      && !opts_set->x_flag_reorder_functions)
1123
      && !opts_set->x_flag_reorder_functions)
1124
    opts->x_flag_reorder_functions = 1;
1124
    opts->x_flag_reorder_functions = 1;
1125
1125
1126
  /* Tune vectorization related parametees according to cost model.  */
1127
  if (opts->x_flag_vect_cost_model == VECT_COST_MODEL_CHEAP)
1128
    {
1129
      maybe_set_param_value (PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS,
1130
            6, opts->x_param_values, opts_set->x_param_values);
1131
      maybe_set_param_value (PARAM_VECT_MAX_VERSION_FOR_ALIGNMENT_CHECKS,
1132
            0, opts->x_param_values, opts_set->x_param_values);
1133
      maybe_set_param_value (PARAM_VECT_MAX_PEELING_FOR_ALIGNMENT,
1134
            0, opts->x_param_values, opts_set->x_param_values);
1135
    }
1136
1137
  /* Set PARAM_MAX_STORES_TO_SINK to 0 if either vectorization or if-conversion
1138
     is disabled.  */
1139
  if ((!opts->x_flag_tree_loop_vectorize && !opts->x_flag_tree_slp_vectorize)
1140
       || !opts->x_flag_tree_loop_if_convert)
1141
    maybe_set_param_value (PARAM_MAX_STORES_TO_SINK, 0,
1142
                           opts->x_param_values, opts_set->x_param_values);
1143
1144
  /* The -gsplit-dwarf option requires -ggnu-pubnames.  */
1126
  /* The -gsplit-dwarf option requires -ggnu-pubnames.  */
1145
  if (opts->x_dwarf_split_debug_info)
1127
  if (opts->x_dwarf_split_debug_info)
1146
    opts->x_debug_generate_pub_sections = 2;
1128
    opts->x_debug_generate_pub_sections = 2;
(-)gcc/tree-vect-data-refs.c (-9 / +14 lines)
Lines 2075-2080 vect_enhance_data_refs_alignment (loop_v Link Here
2075
        {
2075
        {
2076
          unsigned max_allowed_peel
2076
          unsigned max_allowed_peel
2077
            = PARAM_VALUE (PARAM_VECT_MAX_PEELING_FOR_ALIGNMENT);
2077
            = PARAM_VALUE (PARAM_VECT_MAX_PEELING_FOR_ALIGNMENT);
2078
	  if (flag_vect_cost_model == VECT_COST_MODEL_CHEAP)
2079
	    max_allowed_peel = 0;
2078
          if (max_allowed_peel != (unsigned)-1)
2080
          if (max_allowed_peel != (unsigned)-1)
2079
            {
2081
            {
2080
              unsigned max_peel = npeel;
2082
              unsigned max_peel = npeel;
Lines 2168-2182 vect_enhance_data_refs_alignment (loop_v Link Here
2168
  /* (2) Versioning to force alignment.  */
2170
  /* (2) Versioning to force alignment.  */
2169
2171
2170
  /* Try versioning if:
2172
  /* Try versioning if:
2171
     1) optimize loop for speed
2173
     1) optimize loop for speed and the cost-model is not cheap
2172
     2) there is at least one unsupported misaligned data ref with an unknown
2174
     2) there is at least one unsupported misaligned data ref with an unknown
2173
        misalignment, and
2175
        misalignment, and
2174
     3) all misaligned data refs with a known misalignment are supported, and
2176
     3) all misaligned data refs with a known misalignment are supported, and
2175
     4) the number of runtime alignment checks is within reason.  */
2177
     4) the number of runtime alignment checks is within reason.  */
2176
2178
2177
  do_versioning =
2179
  do_versioning
2178
	optimize_loop_nest_for_speed_p (loop)
2180
    = (optimize_loop_nest_for_speed_p (loop)
2179
	&& (!loop->inner); /* FORNOW */
2181
       && !loop->inner /* FORNOW */
2182
       && flag_vect_cost_model > VECT_COST_MODEL_CHEAP);
2180
2183
2181
  if (do_versioning)
2184
  if (do_versioning)
2182
    {
2185
    {
Lines 3641-3653 vect_prune_runtime_alias_test_list (loop Link Here
3641
    dump_printf_loc (MSG_NOTE, vect_location,
3644
    dump_printf_loc (MSG_NOTE, vect_location,
3642
		     "improved number of alias checks from %d to %d\n",
3645
		     "improved number of alias checks from %d to %d\n",
3643
		     may_alias_ddrs.length (), count);
3646
		     may_alias_ddrs.length (), count);
3644
  if ((int) count > PARAM_VALUE (PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS))
3647
  unsigned limit = PARAM_VALUE (PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS);
3648
  if (flag_simd_cost_model == VECT_COST_MODEL_CHEAP)
3649
    limit = default_param_value
3650
	      (PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS) * 6 / 10;
3651
  if (count > limit)
3645
    return opt_result::failure_at
3652
    return opt_result::failure_at
3646
      (vect_location,
3653
      (vect_location,
3647
       "number of versioning for alias "
3654
       "number of versioning for alias run-time tests exceeds %d "
3648
       "run-time tests exceeds %d "
3655
       "(--param vect-max-version-for-alias-checks)\n", limit);
3649
       "(--param vect-max-version-for-alias-checks)\n",
3650
       PARAM_VALUE (PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS));
3651
3656
3652
  return opt_result::success ();
3657
  return opt_result::success ();
3653
}
3658
}
(-)gcc/tree-ssa-phiopt.c (-1 / +5 lines)
Lines 2467-2473 cond_if_else_store_replacement (basic_bl Link Here
2467
						 then_assign, else_assign);
2467
						 then_assign, else_assign);
2468
    }
2468
    }
2469
2469
2470
  if (MAX_STORES_TO_SINK == 0)
2470
  /* If either vectorization or if-conversion is disabled then do
2471
     not sink any stores.  */
2472
  if (MAX_STORES_TO_SINK == 0
2473
      || (!flag_tree_loop_vectorize && !flag_tree_slp_vectorize)
2474
      || !flag_tree_loop_if_convert)
2471
    return false;
2475
    return false;
2472
2476
2473
  /* Find data references.  */
2477
  /* Find data references.  */

Return to bug 92046