Re: [PATCH] PR84068: Fix sort order of SCHED_PRESSURE_MODEL

2018-02-07 Thread Alexander Monakov
> On Wed, 31 Jan 2018, Wilco Dijkstra wrote: > > > The comparison order for SCHED_PRESSURE_MODEL is incorrect. If either > > instruction is not in target_bb, the ordering is not well defined. To fix > > this, give all instructions in target_bb the highest priority and sort all > > other instruct

Re: [PATCH] PR84068: Fix sort order of SCHED_PRESSURE_MODEL

2018-02-07 Thread Maxim Kuvyrkov
> On Feb 2, 2018, at 7:40 PM, Wilco Dijkstra wrote: > > Right, so here is version 2 which ends up much simpler: > > The comparison function for SCHED_PRESSURE_MODEL is incorrect. If either > instruction is not in target_bb, the ordering is not well defined. > Since all instructions outside th

Re: [PATCH] PR84068: Fix sort order of SCHED_PRESSURE_MODEL

2018-02-02 Thread Wilco Dijkstra
Right, so here is version 2 which ends up much simpler: The comparison function for SCHED_PRESSURE_MODEL is incorrect. If either instruction is not in target_bb, the ordering is not well defined. Since all instructions outside the target_bb get the highest model_index, all we need to do is sort

Re: [PATCH] PR84068: Fix sort order of SCHED_PRESSURE_MODEL

2018-02-01 Thread Richard Sandiford
Wilco Dijkstra 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 -

Re: [PATCH] PR84068: Fix sort order of SCHED_PRESSURE_MODEL

2018-02-01 Thread Wilco Dijkstra
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 t

Re: [PATCH] PR84068: Fix sort order of SCHED_PRESSURE_MODEL

2018-01-31 Thread Richard Sandiford
Maxim Kuvyrkov writes: >> On Jan 31, 2018, at 4:33 PM, Wilco Dijkstra wrote: >> >> 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 gr

Re: [PATCH] PR84068: Fix sort order of SCHED_PRESSURE_MODEL

2018-01-31 Thread Maxim Kuvyrkov
> On Jan 31, 2018, at 4:33 PM, Wilco Dijkstra wrote: > > 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 wh

Re: [PATCH] PR84068: Fix sort order of SCHED_PRESSURE_MODEL

2018-01-31 Thread Wilco Dijkstra
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

Re: [PATCH] PR84068: Fix sort order of SCHED_PRESSURE_MODEL

2018-01-31 Thread Richard Sandiford
Wilco Dijkstra writes: > The comparison order for SCHED_PRESSURE_MODEL is incorrect. If either > instruction is not in target_bb, the ordering is not well defined. To fix > this, give all instructions in target_bb the highest priority and sort all > other instructions behind it. This way instru

Re: [PATCH] PR84068: Fix sort order of SCHED_PRESSURE_MODEL

2018-01-31 Thread Alexander Monakov
On Wed, 31 Jan 2018, Wilco Dijkstra wrote: > The comparison order for SCHED_PRESSURE_MODEL is incorrect. If either > instruction is not in target_bb, the ordering is not well defined. To fix > this, give all instructions in target_bb the highest priority and sort all > other instructions behind