From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 89977 invoked by alias); 13 Jun 2018 11:50:47 -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 89962 invoked by uid 89); 13 Jun 2018 11:50:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=pet, cleanly, H*r:envelope-sender, paperwork X-HELO: smtp1.lauterbach.com Received: from smtp1.lauterbach.com (HELO smtp1.lauterbach.com) (62.154.241.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 13 Jun 2018 11:50:44 +0000 Received: (qmail 10427 invoked by uid 484); 13 Jun 2018 11:50:41 -0000 X-Qmail-Scanner-Diagnostics: from 10.2.11.10 by smtp1.lauterbach.com (envelope-from , uid 484) with qmail-scanner-2.11 (mhr: 1.0. clamdscan: 0.99/21437. spamassassin: 3.4.0. Clear:RC:1(10.2.11.10):. Processed in 0.051619 secs); 13 Jun 2018 11:50:41 -0000 Received: from unknown (HELO [10.2.11.10]) (Authenticated_SSL:fsirl@[10.2.11.10]) (envelope-sender ) by smtp1.lauterbach.com (qmail-ldap-1.03) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 13 Jun 2018 11:50:40 -0000 Subject: Re: [RFC][PATCH] Stabilize a few qsort comparison functions To: Jeff Law , GCC Patches Cc: Martin Jambor , Alexander Monakov References: <59816ffe-61ea-c887-14f7-1ff11c8574ef@lauterbach.com> <2960ceae-6f79-1252-7105-8e3f83d9f8bc@redhat.com> From: Franz Sirl Message-ID: Date: Wed, 13 Jun 2018 11:50:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <2960ceae-6f79-1252-7105-8e3f83d9f8bc@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2018-06/txt/msg00751.txt.bz2 Am 2018-06-12 um 23:49 schrieb Jeff Law: > On 02/07/2018 09:58 AM, 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: >> >>     - find the -fverbose-asm assembler files that differ >>     - compile that file again on both platforms with >>        -O2 -g3 -fdump-tree-all-all -fdump-rtl-all -fdump-noaddr >>     - look for the first dump file with differences and check that pass >>       for qsort's >>     - 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? >> >> Bootstrapped on linux-x86_64, no testsuite regressions. >> >> Franz Sirl >> >> >> 2018-02-07  Franz Sirl >> >>     * ira-build.c (object_range_compare_func): Stabilize sort. >>     * tree-sra.c (compare_access_positions): Likewise. >>     * varasm.c (output_object_block_compare): Likewise. >>     * tree-ssa-loop-ivopts.c (group_compare_offset): Likewise. >>     (struct iv_common_cand): New member. >>     (record_common_cand): Initialize new member. >>     (common_cand_cmp): Use new member to stabilize sort. >>     * tree-vrp.c (struct assert_locus): New member. >>     (register_new_assert_for): Initialize new member. >>     (compare_assert_loc): Use new member to stabilize sort. > This looks pretty reasonable. I don't think you've contributed much > recently, do you still have write access to the repository? Hi Jeff, after Alexander Monakov's gcc_qsort changes, this patch is not necessary anymore. I've verified that with a backport (the 2 patches r260216 and r260222 applied cleanly) of gcc_qsort to the gcc-8-branch. The resulting powerpc-eabi crosscompilers produce no more unexpected differences between a Linux and a Cygwin host. Tested (same like with my patch) by comparing the -fverbose-asm assembly output on a complete rebuild of the software here. So, unless someone thinks one of the changes makes sense anyway, this patch is obsolete. On the repository write access, yes, I don't have one anymore. But before reactivating that I need to do the legal paperwork, because unless before when GCC was a strictly private pet project for me, it now is work related. I already got permission from my company for that, just need to find some spare time to start the legal stuff. Franz