[PATCH] Remove dead function_ann and static_var_ann
Richard Guenther
rguenther@suse.de
Mon Apr 27 08:28:00 GMT 2009
All unused. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied
to trunk.
Richard.
2009-04-27 Richard Guenther <rguenther@suse.de>
* tree-flow-inline.h (function_ann): Remove.
(get_function_ann): Likewise.
* tree-dfa.c (create_function_ann): Remove.
* tree-flow.h (struct static_var_ann_d): Remove.
(struct function_ann_d): Likewise.
(union tree_ann_d): Remove fdecl member.
(function_ann_t): Remove.
(function_ann, get_function_ann, create_function_ann): Remove
declarations.
Index: gcc/tree-flow-inline.h
===================================================================
*** gcc/tree-flow-inline.h (revision 146827)
--- gcc/tree-flow-inline.h (working copy)
*************** get_var_ann (tree var)
*** 172,200 ****
return (ann) ? ann : create_var_ann (var);
}
- /* Return the function annotation for T, which must be a FUNCTION_DECL node.
- Return NULL if the function annotation doesn't already exist. */
- static inline function_ann_t
- function_ann (const_tree t)
- {
- gcc_assert (t);
- gcc_assert (TREE_CODE (t) == FUNCTION_DECL);
- gcc_assert (!t->base.ann
- || t->base.ann->common.type == FUNCTION_ANN);
-
- return (function_ann_t) t->base.ann;
- }
-
- /* Return the function annotation for T, which must be a FUNCTION_DECL node.
- Create the function annotation if it doesn't exist. */
- static inline function_ann_t
- get_function_ann (tree var)
- {
- function_ann_t ann = function_ann (var);
- gcc_assert (!var->base.ann || var->base.ann->common.type == FUNCTION_ANN);
- return (ann) ? ann : create_function_ann (var);
- }
-
/* Get the number of the next statement uid to be allocated. */
static inline unsigned int
gimple_stmt_max_uid (struct function *fn)
--- 172,177 ----
Index: gcc/tree-dfa.c
===================================================================
*** gcc/tree-dfa.c (revision 146827)
--- gcc/tree-dfa.c (working copy)
*************** create_var_ann (tree t)
*** 138,164 ****
return ann;
}
- /* Create a new annotation for a FUNCTION_DECL node T. */
-
- function_ann_t
- create_function_ann (tree t)
- {
- function_ann_t ann;
-
- gcc_assert (t);
- gcc_assert (TREE_CODE (t) == FUNCTION_DECL);
- gcc_assert (!t->base.ann || t->base.ann->common.type == FUNCTION_ANN);
-
- ann = (function_ann_t) ggc_alloc (sizeof (*ann));
- memset ((void *) ann, 0, sizeof (*ann));
-
- ann->common.type = FUNCTION_ANN;
-
- t->base.ann = (tree_ann_t) ann;
-
- return ann;
- }
-
/* Renumber all of the gimple stmt uids. */
void
--- 138,143 ----
Index: gcc/tree-flow.h
===================================================================
*** gcc/tree-flow.h (revision 146827)
--- gcc/tree-flow.h (working copy)
*************** along with GCC; see the file COPYING3.
*** 32,39 ****
#include "ipa-reference.h"
#include "tree-ssa-alias.h"
- struct static_var_ann_d;
-
/* Gimple dataflow datastructure. All publicly available fields shall have
gimple_ accessor defined in tree-flow-inline.h, all publicly modifiable
--- 32,37 ----
*************** struct GTY(()) var_ann_d {
*** 221,237 ****
tree current_def;
};
- /* Container for variable annotation used by hashtable for annotations for
- static variables. */
- struct GTY(()) static_var_ann_d {
- struct var_ann_d ann;
- unsigned int uid;
- };
-
- struct GTY(()) function_ann_d {
- struct tree_ann_common_d common;
- };
-
/* Immediate use lists are used to directly access all uses for an SSA
name and get pointers to the statement for each use.
--- 219,224 ----
*************** typedef struct immediate_use_iterator_d
*** 330,349 ****
union GTY((desc ("ann_type ((tree_ann_t)&%h)"))) tree_ann_d {
struct tree_ann_common_d GTY((tag ("TREE_ANN_COMMON"))) common;
struct var_ann_d GTY((tag ("VAR_ANN"))) vdecl;
- struct function_ann_d GTY((tag ("FUNCTION_ANN"))) fdecl;
};
typedef union tree_ann_d *tree_ann_t;
typedef struct var_ann_d *var_ann_t;
- typedef struct function_ann_d *function_ann_t;
typedef struct tree_ann_common_d *tree_ann_common_t;
static inline tree_ann_common_t tree_common_ann (const_tree);
static inline tree_ann_common_t get_tree_common_ann (tree);
static inline var_ann_t var_ann (const_tree);
static inline var_ann_t get_var_ann (tree);
- static inline function_ann_t function_ann (const_tree);
- static inline function_ann_t get_function_ann (tree);
static inline enum tree_ann_type ann_type (tree_ann_t);
static inline void update_stmt (gimple);
static inline int get_lineno (const_gimple);
--- 317,332 ----
*************** extern const char *op_symbol_code (enum
*** 566,572 ****
/* In tree-dfa.c */
extern var_ann_t create_var_ann (tree);
- extern function_ann_t create_function_ann (tree);
extern void renumber_gimple_stmt_uids (void);
extern tree_ann_common_t create_tree_common_ann (tree);
extern void dump_dfa_stats (FILE *);
--- 549,554 ----
More information about the Gcc-patches
mailing list