> Thansk for review.
> 
> Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}.
> Ok for trunk?
> 
> 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:
> 
>       * 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.  ---

OK, and thanks for working on this. My apologize for the merge conflicts.
I forgot the patch is also solving the maybe_hot_insn_p test.

Honza

Reply via email to