diff options
author | liuhongt <hongtao.liu@intel.com> | 2024-12-17 22:32:31 -0800 |
---|---|---|
committer | liuhongt <hongtao.liu@intel.com> | 2025-05-14 05:46:52 -0700 |
commit | f0d36c822c8b0918583c6bc3b1db01f2bb7f226b (patch) | |
tree | 91579c30803aa6887bb8e82412f3fc9b8cf0cf10 /gcc/fortran/dump-parse-tree.cc | |
parent | 0e93f7cd4ed0cf6bcfda90ed4dcad51a1f65b4b6 (diff) | |
download | gcc-f0d36c822c8b0918583c6bc3b1db01f2bb7f226b.zip gcc-f0d36c822c8b0918583c6bc3b1db01f2bb7f226b.tar.gz gcc-f0d36c822c8b0918583c6bc3b1db01f2bb7f226b.tar.bz2 |
Consider frequency in cost estimation when converting scalar to vector.
n some benchmark, I notice stv failed due to cost unprofitable, but the igain
is inside the loop, but sse<->integer conversion is outside the loop, current cost
model doesn't consider the frequency of those gain/cost.
The patch weights those cost with frequency.
gcc/ChangeLog:
PR target/120215
* config/i386/i386-features.cc
(scalar_chain::mark_dual_mode_def): Weight
cost of integer<->sse move with bb frequency when it's
optimized_for_speed_p.
(general_scalar_chain::compute_convert_gain): Ditto, and
adjust function prototype to return true/false when cost model
is profitable or not.
(timode_scalar_chain::compute_convert_gain): Ditto.
(convert_scalars_to_vector): Adjust after the upper two
function prototype are changed.
* config/i386/i386-features.h (class scalar_chain): Change
n_integer_to_sse/n_sse_to_integer to cost_sse_integer, and add
weighted_cost_sse_integer.
(class general_scalar_chain): Adjust prototype to return bool
intead of int.
(class timode_scalar_chain): Ditto.
Diffstat (limited to 'gcc/fortran/dump-parse-tree.cc')
0 files changed, 0 insertions, 0 deletions