diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-20 14:35:29 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-20 14:35:29 +0000 |
commit | cfb9bad3d7052c8e9a6fe67d63b099f8088c5adb (patch) | |
tree | bfe05571b81b03a8b5100b509de930af8bde2bb0 /gcc/tree-cfg.c | |
parent | d14e9620e473a0eced65ca981e5fd2cceaf4bcff (diff) | |
download | gcc-cfb9bad3d7052c8e9a6fe67d63b099f8088c5adb.tar.gz |
2005-12-20 Richard Guenther <rguenther@suse.de>
Revert
2005-12-02 Richard Guenther <rguenther@suse.de>
* tree-cfg.c (mark_used_vars): New function.
(dump_function_to_file): Dump only used VAR_DECLs.
* gcc.dg/tree-ssa/20031106-6.c: Remove XFAIL.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108852 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r-- | gcc/tree-cfg.c | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index d2e688e5afe..37d041ad980 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -4428,26 +4428,6 @@ tree_duplicate_sese_region (edge entry, edge exit, } -static tree -mark_used_vars (tree *tp, int *walk_subtrees, void *used_vars_) -{ - bitmap *used_vars = (bitmap *)used_vars_; - - if (walk_subtrees - && IS_TYPE_OR_DECL_P (*tp)) - *walk_subtrees = 0; - - if (!SSA_VAR_P (*tp)) - return NULL_TREE; - - if (TREE_CODE (*tp) == SSA_NAME) - bitmap_set_bit (*used_vars, DECL_UID (SSA_NAME_VAR (*tp))); - else - bitmap_set_bit (*used_vars, DECL_UID (*tp)); - - return NULL_TREE; -} - /* Dump FUNCTION_DECL FN to file FILE using FLAGS (see TDF_* in tree.h) */ void @@ -4482,47 +4462,18 @@ dump_function_to_file (tree fn, FILE *file, int flags) BIND_EXPRs, so display them separately. */ if (cfun && cfun->decl == fn && cfun->unexpanded_var_list) { - bitmap used_vars = BITMAP_ALLOC (NULL); ignore_topmost_bind = true; - /* Record vars we'll use dumping the functions tree. */ - if (cfun->cfg && basic_block_info) - { - FOR_EACH_BB (bb) - { - block_stmt_iterator bsi; - for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi)) - walk_tree (bsi_stmt_ptr (bsi), mark_used_vars, - &used_vars, NULL); - } - for (vars = cfun->unexpanded_var_list; vars; - vars = TREE_CHAIN (vars)) - { - var = TREE_VALUE (vars); - if (TREE_CODE (var) == VAR_DECL - && DECL_INITIAL (var) - && bitmap_bit_p (used_vars, DECL_UID (var))) - walk_tree (&DECL_INITIAL (var), mark_used_vars, - &used_vars, NULL); - } - } - - /* Dump used vars. */ fprintf (file, "{\n"); for (vars = cfun->unexpanded_var_list; vars; vars = TREE_CHAIN (vars)) { var = TREE_VALUE (vars); - if (cfun->cfg && basic_block_info - && !bitmap_bit_p (used_vars, DECL_UID (var))) - continue; print_generic_decl (file, var, flags); fprintf (file, "\n"); any_var = true; } - - BITMAP_FREE (used_vars); } if (cfun && cfun->decl == fn && cfun->cfg && basic_block_info) |