Richard Biener writes:
> On Fri, May 10, 2024 at 4:25 AM HAO CHEN GUI wrote:
>>
>> Hi,
>>The cost return from set_src_cost might be zero. Zero for
>> pattern_cost means unknown cost. So the regularization converts the zero
>> to COSTS_N_INSNS (1).
>>
>>// pattern_cost
>>cost = set_src
Hi,
在 2024/5/10 20:50, Richard Biener 写道:
> IMO give we're dispatching to the rtx_cost hook eventually it needs
> documenting there or alternatively catching zero and adjusting its
> result there. Of course cost == 0 ? 1 : cost is wrong as it makes
> zero vs. one the same cost - using cost + 1 wh
Hi,
The cost return from set_src_cost might be zero. Zero for
pattern_cost means unknown cost. So the regularization converts the zero
to COSTS_N_INSNS (1).
// pattern_cost
cost = set_src_cost (SET_SRC (set), GET_MODE (SET_DEST (set)), speed);
return cost > 0 ? cost : COSTS_N_INSNS (1)
On Fri, May 10, 2024 at 02:50:56PM +0200, Richard Biener wrote:
> But for example a reg-reg move when optimizing for speed could have
> a zero associated cost.
Sure, but this is the way things always have been. I'm sure there are
ways to change things so they become slightly easier to use, but th
On Fri, May 10, 2024 at 12:54 PM Segher Boessenkool
wrote:
>
> On Fri, May 10, 2024 at 12:19:35PM +0200, Richard Biener wrote:
> > On Fri, May 10, 2024 at 11:06 AM Segher Boessenkool
> > wrote:
> > > *All* code using a cost will have to be inspected and possibly adjusted
> > > if you decide to us
Hi Richard,
Thanks for your comments.
在 2024/5/10 15:16, Richard Biener 写道:
> But if targets return sth < COSTS_N_INSNS (1) but > 0 this is now no
> longer meaningful. So shouldn't it instead be
>
> return cost > 0 ? cost : 1;
Yes, it's better.
>
> ? Alternatively returning fractions of C
On Fri, May 10, 2024 at 12:19:35PM +0200, Richard Biener wrote:
> On Fri, May 10, 2024 at 11:06 AM Segher Boessenkool
> wrote:
> > *All* code using a cost will have to be inspected and possibly adjusted
> > if you decide to use a different value for "unknown" than what we have
> > had for ages. A
On Fri, May 10, 2024 at 11:06 AM Segher Boessenkool
wrote:
>
> On Fri, May 10, 2024 at 04:50:10PM +0800, HAO CHEN GUI wrote:
> > Hi Richard,
> > Thanks for your comments.
> >
> > 在 2024/5/10 15:16, Richard Biener 写道:
> > > But if targets return sth < COSTS_N_INSNS (1) but > 0 this is now no
> >
On Fri, May 10, 2024 at 04:50:10PM +0800, HAO CHEN GUI wrote:
> Hi Richard,
> Thanks for your comments.
>
> 在 2024/5/10 15:16, Richard Biener 写道:
> > But if targets return sth < COSTS_N_INSNS (1) but > 0 this is now no
> > longer meaningful. So shouldn't it instead be
> >
> > return cost > 0
Hi!
On Fri, May 10, 2024 at 09:16:26AM +0200, Richard Biener wrote:
> On Fri, May 10, 2024 at 4:25 AM HAO CHEN GUI wrote:
> >But if set_src_cost returns a value less than COSTS_N_INSNS (1), it's
> > untouched and just returned by pattern_cost. Thus "zero" from set_src_cost
> > is higher than
On Fri, May 10, 2024 at 4:25 AM HAO CHEN GUI wrote:
>
> Hi,
>The cost return from set_src_cost might be zero. Zero for
> pattern_cost means unknown cost. So the regularization converts the zero
> to COSTS_N_INSNS (1).
>
>// pattern_cost
>cost = set_src_cost (SET_SRC (set), GET_MODE (SE
11 matches
Mail list logo