From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 120675 invoked by alias); 3 Nov 2015 14:19:16 -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 120665 invoked by uid 89); 3 Nov 2015 14:19:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD 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; Tue, 03 Nov 2015 14:19:15 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 9B1F18E716 for ; Tue, 3 Nov 2015 14:19:13 +0000 (UTC) Received: from [10.10.50.248] (unused [10.10.50.248] (may be forged)) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tA3EJC6Z023554; Tue, 3 Nov 2015 09:19:12 -0500 Subject: Re: [patch 4/3] Header file reduction - Tools for contrib - second cut To: Jeff Law , Bernd Schmidt , gcc-patches References: <560DEA79.8050709@redhat.com> <56127AA4.9090707@redhat.com> <5612E939.9000701@redhat.com> <5613A1F9.3030407@codesourcery.com> <5613B846.2090107@redhat.com> <561549C8.9000002@redhat.com> <561E7161.4040404@redhat.com> <56384ECF.6040905@redhat.com> <5638B578.9030203@redhat.com> <5638BE09.2010203@redhat.com> From: Andrew MacLeod Message-ID: <5638C25F.2030408@redhat.com> Date: Tue, 03 Nov 2015 14:19: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: <5638BE09.2010203@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg00213.txt.bz2 On 11/03/2015 09:00 AM, Jeff Law wrote: > >> yeah, the reducer still needs some tweaks to be generally runnable I >> think. IN particular, how to deal with externally supplied macros it >> cant really see. Im still thinking about that one. > Well, the solution is obvious, we continue the move away from > conditionally compiled code so that those macros don't matter in the > end :-) > yeah but in the meantime its an issue. I *think* I can simply provide to tool with a set of macros to define on the build command whenever it tries building a file.. we'll see. It should also be possible to extract, after reduction, a list of macros that were used in the source file in conditional compilation, but which never saw a definition in any of the files. THat could also be useful information. IN fact, that could be a stand alone analysis pretty easily I think... > >> >>> Which reminds me, you ought to add a VMS target to your tests. The >>> reducer botched vmsdbgout.c. >> >> Thats one of the reasons vmsdbgout.c wasn't in the list of things I >> reduced :-) > Ahem, but vmsdbgout.c was part of the commit on Friday... ahh opps. it snuck back in over time :-P sorry. > >> >> back to reordering... the gen files are a bit of a pain too because of >> the rtl.h conditional inclusions.. which I never really found a good >> solution for... maybe we should have a brtl.h which is used in concert >> with any source which uses bconfig.h.. brtl.h could verifies bconfig.h >> has been included and then includes those headers it needs, followed by >> rtl.h itself.. and the tool could confirm the right pairing of >> config.h/rtl.h bconfig.h/brtl.h is used. hmm. > I think initially we could blacklist the gen* files. I'm less > concerned about the generators than I am the compiler proper. > yeah, its just annoying from a more abstract level (and results from a few of the tools) for rtl.h to have to conditionally include a bunch of stuff provided by coretypes.h. > jeff