This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] haifa-sched: fix autopref_rank_for_schedule qsort comparator


> 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).

Alexander


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]