[PATCH] haifa-sched: fix autopref_rank_for_schedule qsort comparator
Maxim Kuvyrkov
maxim.kuvyrkov@linaro.org
Tue Sep 19 15:22:00 GMT 2017
> On Sep 19, 2017, at 6:20 PM, Alexander Monakov <amonakov@ispras.ru> wrote:
>
>> I'd like to keep read/write processing balanced. In the above "read" analysis
>> has greater weight than "write" analysis. Also, autopref_rank_data() should
>> not be called if !rtx_equal_p (data1->base, data2->base).
>
> I'm afraid this doesn't work. Consider you have insns A, B, C such that all
> are relevant (so that irr1, irr2 stay 0), A and C have the same base and
> compare such that C < A, B has a different base and therefore according
> to this subcomparator you can have A == B == C < A and with following
> tiebreakers A < B < C < A.
>
> In other words, if your comparison tries to subdivide input set into equivalence
> classes (here you want to introduce equivalence classes based on 'base'), then
> you should introduce ordering between classes (i.e. for two items with a
> different 'base' say if one is greater than the other).
Right. Let me meditate for couple of days on this :-) .
--
Maxim Kuvyrkov
www.linaro.org
More information about the Gcc-patches
mailing list