From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 88665 invoked by alias); 31 Jul 2015 02:49:23 -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 88445 invoked by uid 89); 31 Jul 2015 02:48:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 31 Jul 2015 02:48:44 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 3DF69B5941; Fri, 31 Jul 2015 02:48:43 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-21.phx2.redhat.com [10.3.113.21]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t6V2mg41024275; Thu, 30 Jul 2015 22:48:42 -0400 Subject: Re: C++ delayed folding branch review To: Jason Merrill , Kai Tietz References: <557A5214.7060106@redhat.com> <1424811417.1214725.1434125493982.JavaMail.zimbra@redhat.com> <557BAE5A.7030309@redhat.com> <55B661A1.6090308@redhat.com> <55B911DD.30105@redhat.com> <55BA5667.9040200@redhat.com> Cc: Kai Tietz , gcc-patches List From: Jeff Law Message-ID: <55BAE20A.1070400@redhat.com> Date: Fri, 31 Jul 2015 04:00:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <55BA5667.9040200@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-07/txt/msg02617.txt.bz2 On 07/30/2015 10:52 AM, Jason Merrill wrote: >> >> This hunk is necessary as we don't use canonical-form produced by >> shorten_compare anymore. Therefore special operand can occur on >> right-hand side too. > > That seems like a problem, if the middle end is expecting the canonical > form. What is your plan for dealing with shorten_compare issues, again? We want to handle the shorten_compare stuff independently of delayed folding if at all possible. It's a bit of a rats nest. One of the general problems we have is that shorten_compare also does canonicalization and issues warnings. If we're no longer getting into shorten_compare for some code, then that canonicalization isn't being done. Note, anything outside of the C/C++ front-ends depending on that canonicalization done by shorten_compare is, IMHO, broken. I've extracted a patch from Kai's shorten_compare work to move the canonicalization into match.pd *but* that runs into testsuite regressions because shorten_compare is also where we emit certain warnings for comparisons that are always true/false. With the canonicalization moved to match.pd, shorten_compare no longer recognizes a particular sequence and we lose the warning. I haven't yet found a good place to relocate that warning. This has been pushed down several items in my TODO stack. Jeff