From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26344 invoked by alias); 19 Jul 2012 12:43:18 -0000 Received: (qmail 26253 invoked by uid 22791); 19 Jul 2012 12:43:16 -0000 X-SWARE-Spam-Status: No, hits=-4.4 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 19 Jul 2012 12:42:57 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1Srq4D-00005u-Ei from Tom_deVries@mentor.com ; Thu, 19 Jul 2012 05:42:53 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 19 Jul 2012 05:42:58 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.1.289.1; Thu, 19 Jul 2012 13:42:51 +0100 Message-ID: <500800C7.8050302@mentor.com> Date: Thu, 19 Jul 2012 12:43:00 -0000 From: Tom de Vries User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 To: Steven Bosscher CC: Bernhard Reutner-Fischer , Richard Guenther , "gcc-patches@gcc.gnu.org" , Jakub Jelinek , Jan Hubicka Subject: Re: [PATCH 1/2] if-to-switch conversion pass References: <50054A9C.4030404@mentor.com> <20120718173206.GA8208@mx.loc> <50072AF5.7000108@mentor.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit 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 X-SW-Source: 2012-07/txt/msg00907.txt.bz2 On 18/07/12 23:47, Steven Bosscher wrote: > On Wed, Jul 18, 2012 at 11:30 PM, Tom de Vries wrote: >>>> +tree-if-switch-conversion.o : tree-if-switch-conversion.c $(CONFIG_H) \ >>>> + $(SYSTEM_H) $(TREE_H) $(TM_P_H) $(TREE_FLOW_H) $(DIAGNOSTIC_H) \ >>>> + $(TREE_INLINE_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \ >>>> + $(GIMPLE_H) $(TREE_PASS_H) $(FLAGS_H) $(EXPR_H) $(BASIC_BLOCK_H) output.h \ >>>> + $(GGC_H) $(OBSTACK_H) $(PARAMS_H) $(CPPLIB_H) $(PARAMS_H) >>> >>> I think this list needs updating. >>> >> >> I went over the list just now and all the elements appear in other makerules as >> well, so I don't see any obvious ones that should be removed. I think the >> PARAMS_H is not necessary. Do you have concerns about anything else? > > Why would the other make rules matter? Steven, Some header files are grouped into a macros like f.i. TREE_H. Something I saw happening before was that a header file moved into such a macro, and my rule in the patch was the only rule left using that header directly. I was referring to this scenario. > You're adding new make rules > for your new file. Make it depend only on what your new file needs. > > Makefile.in is a mess. One of these days, someone (hi, Tromey) will > hopefully get annoyed enough with this again to finish some tool to > auto-generate the dependences list. Until that time, let's try to > avoid proliferating the messy rules from old files to new ones. > >> +#include "config.h" >> +#include "system.h" >> +#include "coretypes.h" >> +#include "tm.h" > > Dearohdearohdear. You're going to look at target macros in this pass? > Surely not. So, let's drop this header, > >> + >> +#include "params.h" > > -ENONEEDFORTHIS > > >> +#include "flags.h" > > You get flags.h for free from tree.h, but... > >> +#include "tree.h" >> +#include "basic-block.h" >> +#include "tree-ssa-operands.h" > > You get these if you be a nice GIMPLE pass and include gimple.h > instead of these three headers. > >> +#include "tree-flow.h" >> +#include "tree-flow-inline.h" > > You don't need tree-flow-inline.h. tree-flow.h includes it already for you. > > >> +#include "diagnostic.h" > > I don't think you're emitting diagnostics. > Except maybe: "warning: trying to out-smart developer if I do this > without profile info" :-) > > >> +#include "tree-pass.h" >> +#include "tree-dump.h" > > You don't need tree-dump.h > > >> +#include "timevar.h" > > You don't need timevar.h, either. > > >> +#include "tree-pretty-print.h" > > You want gimple-pretty-print.h in a GIMPLE pass. > > So you're left with: > > +#include "config.h" > +#include "system.h" > +#include "coretypes.h" > + > +#include "gimple.h" > +#include "gimple-pretty-print.h" > +#include "tree-flow.h" > +#include "tree-pass.h" > > and > > +tree-if-switch-conversion.o : tree-if-switch-conversion.c $(CONFIG_H) > $(SYSTEM_H) coretypes.h \ > + $(GIMPLE_H) $(GIMPLE_PRETTY_PRINT_H) $(TREE_FLOW_H) $(TREE_PASS_H) > > Looks a lot nicer to me. > Indeed :) , thanks a lot. I'll clean this up for the next submission. Thanks, - Tom > Please do feel free to join my headless header-hunt and help clean up > all those other files that have needlessly complex #includes and > correspondingly silly Makefile.in rules! > > Ciao! > Steven >