This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Remove unused macro and functions from tree-flow.h and tree-flow-inline.h


On 09/10/2013 08:30 AM, Jakub Jelinek wrote:
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.

	
Really? If it were useful I would have thought they'd be using it now.

In any case, it doesn't belong in tree-flow.h.. . shouldn't these functions and macros be in hashtab.h then?

I could move them there...

Andrew



Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]