On Sat, Jul 15, 2017 at 07:40:13PM +0100, Yuri Gribov wrote: > Looked at generators, we have three comparison routines which return 0 > for different objects but all seem to be safe i.e. can't influence > code generated by GCC. > > alt_state_cmp (genautomata.c) - intentional, duplicates are removed > afterwards. > > optab_rcode_cmp (genopinit.c) - compares objects with rcode == UNKNOWN > as equal but that's fine as later codes treats them in the same way > (sets their code_to_optab_ table to unknown_optab). > > subroutine_candidate_cmp (genrecog.c) - this compares function > candidates with same number of statements in them as equal. This may > cause different split of state recognition code to recog_%d > subroutines but should not change semantics of code as a whole.
That sounds like a debugging nightmare though. Would it hurt us to use stable sorts *everywhere*? Segher