From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 73043 invoked by alias); 8 Feb 2018 15:33:29 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 72912 invoked by uid 89); 8 Feb 2018 15:33:28 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy=H*UA:https X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 08 Feb 2018 15:33:27 +0000 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "Cc" Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id EA6E0ADB0; Thu, 8 Feb 2018 15:33:24 +0000 (UTC) From: Martin Jambor To: Franz Sirl , GCC Patches Cc: Alexander Monakov Cc: Subject: Re: [RFC][PATCH] Stabilize a few qsort comparison functions In-Reply-To: <59816ffe-61ea-c887-14f7-1ff11c8574ef@lauterbach.com> References: <59816ffe-61ea-c887-14f7-1ff11c8574ef@lauterbach.com> User-Agent: Notmuch/0.25.1 (https://notmuchmail.org) Emacs/25.3.1 (x86_64-suse-linux-gnu) Date: Thu, 08 Feb 2018 15:33:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2018-02/txt/msg00429.txt.bz2 On Wed, Feb 07 2018, Franz Sirl wrote: > Hi, > > this is the result of an attempt to minimize the differences between the > compile results of a Linux-based and a Cygwin64-based powerpc-eabi cross > toolchain. > The method used was: > > =C2=A0=C2=A0=C2=A0 - find the -fverbose-asm assembler files that differ > =C2=A0=C2=A0=C2=A0 - compile that file again on both platforms with > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 -O2 -g3 -fdump-tree-all-all -fdump-= rtl-all -fdump-noaddr > =C2=A0=C2=A0=C2=A0 - look for the first dump file with differences and c= heck that pass > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 for qsort's > =C2=A0=C2=A0=C2=A0 - stabilize the compare functions > > With some help on IRC to better understand the passes and some serious > debugging of GCC I came up with this patch. On the tested codebase the > differences in the assembler sources are now down to 0. > If the various pass maintainers have better ideas on how to stabilize > the compare functions, I'll be happy to verify them on the codebase. > For the SRA patch I already have an alternate version with an additional > ID member. > > Comments? As I said on IRC, if you find this useful, I'm fine with having the SRA hunk (but note that I cannot approve it). In any event, IMHO this is stage 1 material, however. Thanks, Martin > > Bootstrapped on linux-x86_64, no testsuite regressions. > > Franz Sirl > > > 2018-02-07=C2=A0 Franz Sirl > > =C2=A0=C2=A0=C2=A0 * ira-build.c (object_range_compare_func): Stabilize = sort. > =C2=A0=C2=A0=C2=A0 * tree-sra.c (compare_access_positions): Likewise. > =C2=A0=C2=A0=C2=A0 * varasm.c (output_object_block_compare): Likewise. > =C2=A0=C2=A0=C2=A0 * tree-ssa-loop-ivopts.c (group_compare_offset): Like= wise. > =C2=A0=C2=A0=C2=A0 (struct iv_common_cand): New member. > =C2=A0=C2=A0=C2=A0 (record_common_cand): Initialize new member. > =C2=A0=C2=A0=C2=A0 (common_cand_cmp): Use new member to stabilize sort. > =C2=A0=C2=A0=C2=A0 * tree-vrp.c (struct assert_locus): New member. > =C2=A0=C2=A0=C2=A0 (register_new_assert_for): Initialize new member. > =C2=A0=C2=A0=C2=A0 (compare_assert_loc): Use new member to stabilize sor= t. >