diff options
author | Richard Biener <rguenther@suse.de> | 2013-01-11 13:59:28 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2013-01-11 13:59:28 +0000 |
commit | 980d0812968529871862dc695ec3b013204e12dd (patch) | |
tree | c7599fe1307101d7f72762c2026b57e5bf3ef892 /gcc/tree-cfg.c | |
parent | cb24ba82a5ee0c253e2973f09aa4085b74b58606 (diff) | |
download | gcc-980d0812968529871862dc695ec3b013204e12dd.zip gcc-980d0812968529871862dc695ec3b013204e12dd.tar.gz gcc-980d0812968529871862dc695ec3b013204e12dd.tar.bz2 |
tree-cfg.c (verify_node_sharing_1): Split out from ...
2013-01-11 Richard Biener <rguenther@suse.de>
* tree-cfg.c (verify_node_sharing_1): Split out from ...
(verify_node_sharing): ... here.
(verify_gimple_in_cfg): Use verify_node_sharing_1 for walk_tree.
From-SVN: r195107
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r-- | gcc/tree-cfg.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index e560b62..4cd5865 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -4462,13 +4462,12 @@ tree_node_can_be_shared (tree t) return false; } -/* Called via walk_gimple_stmt. Verify tree sharing. */ +/* Called via walk_tree. Verify tree sharing. */ static tree -verify_node_sharing (tree *tp, int *walk_subtrees, void *data) +verify_node_sharing_1 (tree *tp, int *walk_subtrees, void *data) { - struct walk_stmt_info *wi = (struct walk_stmt_info *) data; - struct pointer_set_t *visited = (struct pointer_set_t *) wi->info; + struct pointer_set_t *visited = (struct pointer_set_t *) data; if (tree_node_can_be_shared (*tp)) { @@ -4482,6 +4481,15 @@ verify_node_sharing (tree *tp, int *walk_subtrees, void *data) return NULL; } +/* Called via walk_gimple_stmt. Verify tree sharing. */ + +static tree +verify_node_sharing (tree *tp, int *walk_subtrees, void *data) +{ + struct walk_stmt_info *wi = (struct walk_stmt_info *) data; + return verify_node_sharing_1 (tp, walk_subtrees, wi->info); +} + static bool eh_error_found; static int verify_eh_throw_stmt_node (void **slot, void *data) @@ -4534,7 +4542,8 @@ verify_gimple_in_cfg (struct function *fn) for (i = 0; i < gimple_phi_num_args (phi); i++) { tree arg = gimple_phi_arg_def (phi, i); - tree addr = walk_tree (&arg, verify_node_sharing, visited, NULL); + tree addr = walk_tree (&arg, verify_node_sharing_1, + visited, NULL); if (addr) { error ("incorrect sharing of tree nodes"); |