This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Remove unused macro and functions from tree-flow.h and tree-flow-inline.h
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Andrew MacLeod <amacleod at redhat dot com>
- Cc: Jeff Law <law at redhat dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 10 Sep 2013 14:30:35 +0200
- Subject: Re: [patch] Remove unused macro and functions from tree-flow.h and tree-flow-inline.h
- Authentication-results: sourceware.org; auth=none
- References: <522E6EFE dot 2080602 at redhat dot com> <522E8654 dot 8030505 at redhat dot com> <20130910052746 dot GR1817 at tucnak dot redhat dot com> <522F05B2 dot 5020300 at redhat dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Sep 10, 2013 at 07:42:42AM -0400, Andrew MacLeod wrote:
> On 09/10/2013 01:27 AM, Jakub Jelinek wrote:
> >On Mon, Sep 09, 2013 at 08:39:16PM -0600, Jeff Law wrote:
> >>On 09/09/2013 06:59 PM, Andrew MacLeod wrote:
> >>>Whilst poking around, I discovered these hast table functions and the
> >>>macro are no longer used anywhere in the compiler.
> >>>bootstraps on x86_64-unknown-linux-gnu.
> >>>Probably obvious but in case I missed something... OK?
> >>If they're unused, eliminate them. OK for the trunk.
> >Those macros were added last year together with hash-table.h,
> >just nothing uses them so far, but they are counterparts of the
> >hashtab.h traversal function which is used in various parts.
> >
> >So removing it is IMHO a mistake.
> >
> >
> Are you sure? FOR_EACH_HASH_TABLE_ELEMENT was added in April of
> this year as part of the hash table work, and it is used in a number
> of places. This one (FOR_EACH_HTAB_ELEMENT) was added in 2005 and
> would seem to be obsolete now...
I stand corrected, still I think it is a mistake to remove it, because
the C++ alternative to htab_t only supports a subset of uses of the older
C htab_t, e.g. it can't cope with GC. So FTTB some of the hash tables
in the newly added code (most recently e.g. ubsan) need to use the C
htab_t and could make use of the traversal iterator infrastructure.
Jakub