[PATCH] Fix scheduling undeterminism from sorting with DEBUG_INSNs

Jeff Law law@redhat.com
Thu Jan 22 17:34:00 GMT 2015


On 01/19/15 06:07, Maxim Kuvyrkov wrote:
>
> The underlying problem is that the order in which elements of
> ready_list are compared matters to the final result.  This is because
> rank_for_schedule sorting heuristic establishes a partial order on
> the set of instructions, and it can happen that with 3 instructions
> A, B and C: A>B, B>C, C>A.  In this situation the order in which
> qsort compares the elements affects the final result, it can be
> either ABC or BCA or CAB.
So how precisely do we get A > B, B > C and C > A?   Unless I'm missing 
something, that seems to be an extremely bad result from rank_for_schedule.

Jeff



More information about the Gcc-patches mailing list