This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR84068: Fix sort order of SCHED_PRESSURE_MODEL
- From: Richard Sandiford <richard dot sandiford at linaro dot org>
- To: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- Cc: Maxim Kuvyrkov <maxim dot kuvyrkov at linaro dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>, nd <nd at arm dot com>
- Date: Thu, 01 Feb 2018 17:16:36 +0000
- Subject: Re: [PATCH] PR84068: Fix sort order of SCHED_PRESSURE_MODEL
- Authentication-results: sourceware.org; auth=none
- References: <DB6PR0801MB2053A5536707256D8EF14AAB83FB0@DB6PR0801MB2053.eurprd08.prod.outlook.com> <87k1vy5gdy.fsf@linaro.org> <DB6PR0801MB205395A57559D38E8F7367C583FB0@DB6PR0801MB2053.eurprd08.prod.outlook.com> <DC52296D-4D31-4ACE-A0C7-CBF6C65D941C@linaro.org> <87d11q5d5t.fsf@linaro.org> <DB6PR0801MB2053AE08B8DD27D6BD08600F83FA0@DB6PR0801MB2053.eurprd08.prod.outlook.com>
Wilco Dijkstra <Wilco.Dijkstra@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