On Fri, Jan 27, 2017 at 01:43:30PM +0100, Bernd Schmidt wrote:
> On 01/27/2017 02:19 AM, Segher Boessenkool wrote:
> 
> >But what is "insn cost"?  Latency is no good at all -- we *want* insns
> >with higher latency to be earlier.  fsqrt is not pipelined, and that is
> >what makes it so costly.  (This isn't modeled in the scheduling
> >description btw: that would make the automata sizes explode, the usual
> >problem).
> 
> On other machines sqrt might be pipelined, so the patch as-is clearly 
> isn't suitable. rtx_cost/insn_cost probably also won't do, since it 
> doesn't model that property either.

insn_cost is 0, even (because we have -fsched-fusion), so overloading it
would cause problems already before we start :-/

> Maybe instead of a hook you could have an insn attribute that the 
> scheduler looks for.

Eww.  Do we have any other attributes like that?  I sure hope not.  This
isn't a property of a define_insn (etc.), it is one of the machine insns
instead, so marking it with an attr makes it really hard to check if you
caught all patterns that end up as such a machine insn.

A target can decide to use an attr of course, in its own implementation
of the hook.  But generic it is not such a great interface.


Segher

Reply via email to