Richard Sandiford wrote:

> This was the original intent, but was changed in r213708.  TBH I'm not
> sure what the second hunk in that revision fixed, since model_index is
> supposed to return an index greater than all valid indices when passed
> an instruction outside the current block.  Maxim, do you remember?

See https://gcc.gnu.org/ml/gcc-patches/2014-07/msg00932.html, it says:

"The second one is to account for the fact that model_index() of two 
instructions
is meaningful only when both instructions are in the current basic block."

Unless something has changed, I'm assuming that's still true today. Maybe
the underlying idea was to allow interleaving of instructions outside the
current block, but that isn't feasible if you want a well-defined sort ordering.

Wilco

Reply via email to