On Wed, Aug 02, 2017 at 12:17:44PM -0600, Jeff Law wrote:
> So this has probably been hashed to death, but just a couple thoughts.
> 
> I think realistically one has to look at the entirety of the PARALLEL to
> get any reasonable costing.
> 
> Summing the individual components is wrong.  Taking the cost of any
> individual component is wrong.  You might be able to make a case for the
> maximum cost of the individual components, but even that is almost
> certain to be wrong in some cases.

I have tried all of these over the years.  Nothing is good for all
targets and all insns for a target, alas.

> Presumably this is part of what Segher is trying to address with his
> costing changes.

Sure, seq_cost is trivial to express in terms of insn_cost.  I'll add
a patch for it.

(set_rtx_cost, which is what seq_cost currently uses, is most often
used for RTL that isn't (yet) in an insn.  We'll have to look per case
how to best handle that.  Ideally rtx_cost will go away or only continue
in a much slimmed down form, for targets that implement insn_cost).


Segher

Reply via email to