> 2025-07-08  Martin Jambor  <[email protected]>
> 
>       * params.opt (param_ipa_cp_sweeps): New.
>       * ipa-cp.cc (max_number_sweeps): New.
>       (get_max_overall_size): New parameter cur_sweep, use it and the total
>       number of sweeps from the NODE to calculate the result too.
>       (ipcp_propagate_stage): Get the maximum number of sweeps specified in
>       the corresponding parameter of any possibly affected node.
>       (good_cloning_opportunity_p): Add parameter cur_sweep, adjust the
>       threshold according to it.
>       (decide_about_value): New parameter cur_sweep, pass it to
>       get_max_overall_size and to good_cloning_opportunity_p.
>       (decide_whether_version_node): New parameter cur_sweep, pass it to
>       decide_about_value and get_max_overall_size.  Make sure the node is
>       not dead.
>       (ipcp_decision_stage): Make multiple sweeps over the call-graph.
OK except...
> diff --git a/gcc/params.opt b/gcc/params.opt
> index beaa61c48ab..3ff41c20f13 100644
> --- a/gcc/params.opt
> +++ b/gcc/params.opt
> @@ -265,6 +265,10 @@ Percentage penalty the recursive functions will receive 
> when they are evaluated
>  Common Joined UInteger Var(param_ipa_cp_single_call_penalty) Init(15) 
> IntegerRange(0, 100) Param Optimization
>  Percentage penalty functions containing a single call to another function 
> will receive when they are evaluated for cloning.
>  
> +-param=ipa-cp-sweeps=
> +Common Joined UInteger Var(param_ipa_cp_sweeps) Init(3) IntegerRange(1, 100) 
> Param Optimization
> +The number of times the interprocedural constant propagation will traverse 
> all functions to make cloning decisions.
> +
Shouldn't there also be a documentation update?

Honza

Reply via email to