From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8160 invoked by alias); 19 Dec 2016 23:30:29 -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 8115 invoked by uid 89); 19 Dec 2016 23:30:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.0 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Later, auto-generated, realh, real.h 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 ESMTP; Mon, 19 Dec 2016 23:30:17 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B7B4B4E334; Mon, 19 Dec 2016 23:30:05 +0000 (UTC) Received: from localhost.localdomain (ovpn-116-17.phx2.redhat.com [10.3.116.17]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uBJNU4kb022298; Mon, 19 Dec 2016 18:30:05 -0500 Subject: Re: Reorganise machmode.h headers To: gcc-patches@gcc.gnu.org, richard.sandiford@arm.com References: <874m37s7vf.fsf@e105548-lin.cambridge.arm.com> From: Jeff Law Message-ID: <319770d3-c529-8f86-8cf8-f52b90dcfce0@redhat.com> Date: Tue, 20 Dec 2016 00:43:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <874m37s7vf.fsf@e105548-lin.cambridge.arm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-12/txt/msg01681.txt.bz2 On 11/16/2016 09:32 AM, Richard Sandiford wrote: > Later patches will make machmode.h rely on wide-int.h and the > new poly-int.h, so it needs to appear later in the coretypes.h > include list. > > Previously machmode.h included insn-modes.h, which as well as > the main mode enum contains configuration information like > MAX_BITSIZE_MODE_ANY_INT. This still needs to come first, > since files like wide-int.h depend on the configuration > information. > > Similarly, later patches will make the auto-generated inline > mode size functions use poly-int.h, so the patch splits them > out into their own header file and includes it after the > integer utilities. > > The patch also makes the generator files include machmode.h > via coretypes.h. Previously they did it by more indirect means. > > Finally, the patch makes wide-int-print.h available via coretypes.h > too. There didn't seem to be any reason to force only the print > routines to be included directly, and it would be painful to extend > that approach to the new polynomial integer classes. > > Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install? > > Thanks, > Richard > > > [ This patch is part of the SVE series posted here: > https://gcc.gnu.org/ml/gcc/2016-11/msg00030.html ] > > gcc/ > 2016-11-16 Richard Sandiford > Alan Hayward > David Sherwood > > * Makefile.in (MACHMODE_H): Remove insn-modes.h > (CORETYPES_H): New define. > (MOSTLYCLEANFILES): Add insn-modes-inline.h. > (insn-modes-inline.h, s-modes-inline-h): New rules. > (generated_files): Add insn-modes-inline.h. > (RTL_BASE_H, TREE_CORE_H): Use CORETYPES_H instead of coretypes.h. > (build/gensupport.o, build/print-rtl.o, build/read-md.o): Likewise. > (build/read-rtl.o, build/rtl.o, build/vec.o, build/hash-table.o) > (build/inchash.o, build/gencondmd.o, build/genattr.o): Likewise. > (build/genattr-common.o, build/genattrtab.o, build/genautomata.o) > (build/gencheck.o, build/gencodes.o, build/genconditions.o): Likewise. > (build/genconfig.o, build/genconstants.o, build/genemit.o): Likewise. > (build/genenums.o, build/genextract.o, build/genflags.o): Likewise. > (build/gentarget-def.o, build/genmddeps.o, build/genopinit.o) > (build/genoutput.o, build/genpeep.o, build/genpreds.o): Likewise. > (build/genrecog.o, build/genmddump.o, build/genmatch.o): Likewise. > (build/gencfn-macros.o, build/gcov-iov.o): Likewise. > * coretypes.h: Include everything up to real.h for generators. > Include insn-modes.h first. Include wide-int-print.h after > wide-int.h. Include insn-modes-inline.h and then machmode.h. > * machmode.h: Don't include insn-modes.h here. > * function-tests.c: Remove includes of signop.h, machmode.h, > double-int.h and wide-int.h. > * rtl.h: Likewise. > * gcc-rich-location.c: Remove includes of machmode.h, double-int.h > and wide-int.h. > * optc-save-gen.awk: Likewise. > * gencheck.c (BITS_PER_UNIT): Delete dummy definition. > * godump.c: Remove include of wide-int-print.h. > * pretty-print.h: Likewise. > * wide-int-print.cc: Likewise. > * wide-int.cc: Likewise. > * hash-map-tests.c: Remove include of signop.h. > * hash-set-tests.c: Likewise. > * rtl-tests.c: Likewise. > * mkconfig.sh: Remove include of machmode.h. > * genmodes.c (emit_insn_modes_h): Split emission of inline functions > into... > (emit_insn_modes_inline_h): ...this new function. Emit the code > into an insn-modes-inline.h header file, adding appropriate > include guards and end comments. > (emit_insn_modes_c_header): Remove include of machmode.h. > (emit_min_insn_modes_c_header): Include coretypes.h rather than > machmode.h. > (main): Handle -i flag and call emit_insn_modes_inline_h when > it is passed. So I don't see anything here particularly problematical. My question is whether or not there's anything significant to be gained to moving forward with this kit, assuming the 67 piece kit is not likely to move forward. I do think you'll need some tweaks to the contrib/header-tools which know about the core headers and dependencies. Hopefully what's in there is easy enough to figure out how to twiddle appropriately. Jeff