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