Wilco Dijkstra <wilco.dijks...@arm.com> writes:
> Richard Sandiford wrote:
>
>> But why wasn't the index 0 as expected for the insns outside of the block?
>
> Well it seems it checks for index 0 and sets the model_index as the current
> maximum model_index count.  This means the target_bb check isn't
> strictly required - I build all of SPECINT2017 using the options from PR84068,
> and all 577k instances of instruction from another bb would sort correctly.
>
> So it looks we can remove the target_bb check.

Thanks for testing that.  Removing the check would be my preference,
since model_index was supposed to cope with insns outside the model
schedule, and I think other callers relied on that too.

If we do end up finding cases in which INSN_MODEL_INDEX is nonzero
for insns in other blocks, I think it would better to fix that,
either by forcing it to zero at an appropriate place, or by checking
the block in model_index itself.

Richard

Reply via email to