This is the mail archive of the gcc@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: Sched1 stability issue


On Wed, 4 Jul 2018, Kugan Vivekanandarajah wrote:
> We noticed a difference in the code generated for aarch64 gcc 7.2
> hosted in Linux vs mingw. AFIK, we are supposed to produce the same
> output.
> 
> For the testacse we have (quite large and I am trying to reduce), the
> difference comes from sched1 pass. If I disable sched1 the difference
> is going away.
> 
> Is this a known issue? Attached is the sched1 dump snippet where there
> is the difference.

The rank_for_schedule comparator used for qsort in the scheduler is known
to be invalid; some issues have been fixed in gcc-8, but some remain (you
can search the bugzilla for qsort_chk issues). Since the comparator is
invalid, different qsort implementations reorder the ready list differently.

In gcc-9 qsort calls use gcc_qsort instead and thus wouldn't diverge.

Alexander


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