From patchwork Tue Sep 10 00:59:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew MacLeod X-Patchwork-Id: 273737 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "www.sourceware.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by ozlabs.org (Postfix) with ESMTPS id C6B5A2C00EF for ; Tue, 10 Sep 2013 10:59:54 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; q= dns; s=default; b=XS5sDwT4NmuzLlkkzdx0p8FEGzdhf5b8y2luqpsVW1T0Sd lTZi6xII0K8lUHbyQ/oYZBJr93XHxFHmxUURtW+yEQbH32i1PRjwv750IcnGBguE f5kNrpGFniXiM9Wgo5LCTn22IkkHYiC1czFCkKOilko5zZdaWLlXyOkPokq98= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; s= default; bh=UyQNxpka0x+g8OX9L94+SffGkKU=; b=lysRbLdt6eqoZdJEZkH6 eUPMhRaeS9utINhfrR8Fqy3Rfc36lW1KVNdLMogZLH19iRJueanPYG29ZO/DH04w zZCIRDosi31s/1isI0cw8lZcrTBtpY5BH0h7tQzAkuHEntaGlj5Vx3iML9wdiEx/ 5UhxJRV5SDD26++3TpbRV9I= Received: (qmail 31820 invoked by alias); 10 Sep 2013 00:59:47 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 31803 invoked by uid 89); 10 Sep 2013 00:59:46 -0000 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; Tue, 10 Sep 2013 00:59:46 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.2 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8A0xhXM023446 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 9 Sep 2013 20:59:44 -0400 Received: from [10.10.63.40] (vpn-63-40.rdu2.redhat.com [10.10.63.40]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r8A0xhOq019474 for ; Mon, 9 Sep 2013 20:59:43 -0400 Message-ID: <522E6EFE.2080602@redhat.com> Date: Mon, 09 Sep 2013 20:59:42 -0400 From: Andrew MacLeod User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 MIME-Version: 1.0 To: gcc-patches Subject: [patch] Remove unused macro and functions from tree-flow.h and tree-flow-inline.h X-IsSubscribed: yes 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? Andrew * hash-table.h: Remove comment relating to deleted macro. * tree-flow-inline.h (first_htab_element, end_htab_p, next_htab_element): Delete unused functions. * tree-flow.h (FOR_EACH_HTAB_ELEMENT): Delete unused macro. Index: hash-table.h =================================================================== *** hash-table.h (revision 202414) --- hash-table.h (working copy) *************** hash_table ::end *** 1050,1059 **** /* Iterate through the elements of hash_table HTAB, using hash_table <....>::iterator ITER, ! storing each element in RESULT, which is of type TYPE. ! ! This macro has this form for compatibility with the ! FOR_EACH_HTAB_ELEMENT currently defined in tree-flow.h. */ #define FOR_EACH_HASH_TABLE_ELEMENT(HTAB, RESULT, TYPE, ITER) \ for ((ITER) = (HTAB).begin (); \ --- 1050,1056 ---- /* Iterate through the elements of hash_table HTAB, using hash_table <....>::iterator ITER, ! storing each element in RESULT, which is of type TYPE. */ #define FOR_EACH_HASH_TABLE_ELEMENT(HTAB, RESULT, TYPE, ITER) \ for ((ITER) = (HTAB).begin (); \ Index: tree-flow-inline.h =================================================================== *** tree-flow-inline.h (revision 202414) --- tree-flow-inline.h (working copy) *************** gimple_vop (const struct function *fun) *** 42,92 **** return fun->gimple_df->vop; } - /* Initialize the hashtable iterator HTI to point to hashtable TABLE */ - - static inline void * - first_htab_element (htab_iterator *hti, htab_t table) - { - hti->htab = table; - hti->slot = table->entries; - hti->limit = hti->slot + htab_size (table); - do - { - PTR x = *(hti->slot); - if (x != HTAB_EMPTY_ENTRY && x != HTAB_DELETED_ENTRY) - break; - } while (++(hti->slot) < hti->limit); - - if (hti->slot < hti->limit) - return *(hti->slot); - return NULL; - } - - /* Return current non-empty/deleted slot of the hashtable pointed to by HTI, - or NULL if we have reached the end. */ - - static inline bool - end_htab_p (const htab_iterator *hti) - { - if (hti->slot >= hti->limit) - return true; - return false; - } - - /* Advance the hashtable iterator pointed to by HTI to the next element of the - hashtable. */ - - static inline void * - next_htab_element (htab_iterator *hti) - { - while (++(hti->slot) < hti->limit) - { - PTR x = *(hti->slot); - if (x != HTAB_EMPTY_ENTRY && x != HTAB_DELETED_ENTRY) - return x; - }; - return NULL; - } /* Get the number of the next statement uid to be allocated. */ static inline unsigned int --- 42,47 ---- Index: tree-flow.h =================================================================== *** tree-flow.h (revision 202414) --- tree-flow.h (working copy) *************** typedef struct *** 106,118 **** PTR *limit; } htab_iterator; - /* Iterate through the elements of hashtable HTAB, using htab_iterator ITER, - storing each element in RESULT, which is of type TYPE. */ - #define FOR_EACH_HTAB_ELEMENT(HTAB, RESULT, TYPE, ITER) \ - for (RESULT = (TYPE) first_htab_element (&(ITER), (HTAB)); \ - !end_htab_p (&(ITER)); \ - RESULT = (TYPE) next_htab_element (&(ITER))) - /*--------------------------------------------------------------------------- Attributes for SSA_NAMEs. --- 106,111 ----