On 01/27/2017 05:43 AM, 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.

Maybe instead of a hook you could have an insn attribute that the
scheduler looks for.
Even if it's pipelined, it may not be a good idea to speculate it :-) We may not describe the extent to which its pipelined due to DFA explosions. Thus we may (incorrectly) decide that the insn fits into a pipeline bubble, when in fact it does not, even when pipelined.

It really seems this needs to either be a hook or attribute.

jeff

Reply via email to