From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21592 invoked by alias); 17 Dec 2015 12:48:39 -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 21577 invoked by uid 89); 17 Dec 2015 12:48:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=comparator, 17.12.2015, 17122015, yours X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail.ispras.ru Received: from mail.ispras.ru (HELO mail.ispras.ru) (83.149.199.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 17 Dec 2015 12:48:36 +0000 Received: from [10.10.3.52] (pluton2.ispras.ru [83.149.199.44]) by mail.ispras.ru (Postfix) with ESMTPSA id 52F11540067; Thu, 17 Dec 2015 15:48:34 +0300 (MSK) Subject: Re: [PATCH 1/5] Fix asymmetric comparison functions To: Yury Gribov , GCC Patches References: <5672787D.6040105@samsung.com> <56727936.4030605@samsung.com> <5672A34C.1010809@ispras.ru> <5672A6CD.30200@samsung.com> Cc: Andrew MacLeod , Andrew Pinski , Diego Novillo , Geoff Keating , Jakub Jelinek , Jason Merrill , Richard Biener , Steven Bosscher From: Andrey Belevantsev Message-ID: <5672AF1D.2020402@ispras.ru> Date: Thu, 17 Dec 2015 12:48:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:42.0) Gecko/20100101 Thunderbird/42.0 MIME-Version: 1.0 In-Reply-To: <5672A6CD.30200@samsung.com> Content-Type: text/plain; charset=koi8-r; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-12/txt/msg01757.txt.bz2 On 17.12.2015 15:13, Yury Gribov wrote: > On 12/17/2015 02:58 PM, Andrey Belevantsev wrote: >> Hello, >> >> On 17.12.2015 11:58, Yury Gribov wrote: >>> Some obvious symmetry fixes. >>> >>> Cc-ing >>> * Andrey (Belevantsev) for bb_top_order_comparator >> >> Here, as Jakub mentioned, we assume that the argument addresses will >> never be equal, > > The problem is that this is not guaranteed. Well, if the consensus is that this is indeed the case, you're free to change both places as you suggest. Yours, Andrey > >> thus that would always be different basic blocks (the >> comparator is used for providing a custom sort over loop body bbs) and >> you don't need a return 0 there. You can put there gcc_unreachable >> instead as in ... >> >>> * Andrew (MacLeod) for compare_case_labels >>> * Andrew (Pinski) for resort_field_decl_cmp >>> * Diego for pair_cmp >>> * Geoff for resort_method_name_cmp >>> * Jakub for compare_case_labels >>> * Jason for method_name_cmp >>> * Richard for insert_phi_nodes_compare_var_infos, compare_case_labels >>> * Steven for cmp_v_in_regset_pool >> >> ... this case -- here gcc_unreachable () marks that we're sorting pool >> pointers and their values are always different. Please do not remove it. > > Same here. > > /Yury