From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 97400 invoked by alias); 17 Nov 2015 14:09:55 -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 97325 invoked by uid 89); 17 Nov 2015 14:09:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (146.101.78.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 17 Nov 2015 14:09:53 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-13-OKt81Z4nRPWJp8x0Uhrobw-1; Tue, 17 Nov 2015 14:09:48 +0000 Received: from e105915-lin.cambridge.arm.com ([10.1.2.79]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 17 Nov 2015 14:09:47 +0000 Subject: Re: C++ PATCH to integrate c++-delayed-folding branch To: Jason Merrill , gcc-patches List References: <56467B36.9030201@redhat.com> Cc: Kai Tietz From: Alan Lawrence Message-ID: <564B352B.7050609@arm.com> Date: Tue, 17 Nov 2015 14:09:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <56467B36.9030201@redhat.com> X-MC-Unique: OKt81Z4nRPWJp8x0Uhrobw-1 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg02091.txt.bz2 On 14/11/15 00:07, Jason Merrill wrote: > And here's the final patch integrating the delayed folding branch. The g= eneral > idea is to mostly avoid folding until the end of the function, at which p= oint we > fold everything as part of genericization. Since many warnings rely on l= ooking > at folded trees, we fold the arguments that we pass to the various warning > functions. To avoid issues with combinatorial explosion, we cache the re= sults > of folding in a hash_map. > > In the future we probably want to move many of these warnings into > language-independent code so we can avoid folding for them in the front e= nd; we > also shouldn't need to fold during genericization, but apparently not doi= ng that > leads to optimization regressions. > > This is mostly Kai's work; I just cleaned it up a bit to get it ready for= the > merge. Marek also helped some. The largest change is hooking into the G= TY > machinery to handle throwing away the folding cache rather than trying to= do it > manually in various places. > > Tested x86_64-pc-linux-gnu, applying to trunk. Also PR68385 (arm-none-eabi).