diff options
author | Richard Guenther <rguenther@suse.de> | 2012-05-22 11:59:41 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2012-05-22 11:59:41 +0000 |
commit | 3828719aa915799d17cb2c650a48fd9f5ba88187 (patch) | |
tree | d8263cd9215e1a5a4e587cf8cfb703ab3c0c6850 /gcc/tree-dfa.c | |
parent | 72d5c6c1575874d0377d4d637fa1311e60378e72 (diff) | |
download | gcc-3828719aa915799d17cb2c650a48fd9f5ba88187.zip gcc-3828719aa915799d17cb2c650a48fd9f5ba88187.tar.gz gcc-3828719aa915799d17cb2c650a48fd9f5ba88187.tar.bz2 |
tree.h (VAR_DECL_IS_VIRTUAL_OPERAND): New.
2012-05-22 Richard Guenther <rguenther@suse.de>
* tree.h (VAR_DECL_IS_VIRTUAL_OPERAND): New.
(init_function_for_compilation): Remove.
* tree-dfa.c (find_vars_r): Take struct function argument.
(find_referenced_vars_in): Adjust.
* tree-ssa-operands.c (clobber_stats): Remove.
(create_vop_var): Take struct function argument. Mark
virtual operand with VAR_DECL_IS_VIRTUAL_OPERAND.
(init_ssa_operands): Take struct function argument.
(fini_ssa_operands): Do not dump dead stats.
* tree-ssa-operands.h (init_ssa_operands): Take struct function
argument.
* cgraphunit.c (init_lowered_empty_function): Adjust.
* lto-streamer-in.c (input_cfg): Likewise.
* tree-inline.c (initialize_cfun): Likewise.
* tree-into-ssa.c (rewrite_into_ssa): Likewise.
* omp-low.c (expand_omp_taskreg): Likewise. Avoid switching
cfun.
* gimple.c (is_gimple_reg): Optimize the SSA_NAME case,
virtual operands are not registers.
From-SVN: r187772
Diffstat (limited to 'gcc/tree-dfa.c')
-rw-r--r-- | gcc/tree-dfa.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/tree-dfa.c b/gcc/tree-dfa.c index 785ae1b..31cafa0 100644 --- a/gcc/tree-dfa.c +++ b/gcc/tree-dfa.c @@ -62,7 +62,6 @@ struct dfa_stats_d /* Local functions. */ static void collect_dfa_stats (struct dfa_stats_d *); -static tree find_vars_r (tree *, int *, void *); /*--------------------------------------------------------------------------- @@ -441,17 +440,19 @@ collect_dfa_stats (struct dfa_stats_d *dfa_stats_p ATTRIBUTE_UNUSED) the function. */ static tree -find_vars_r (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED) +find_vars_r (tree *tp, int *walk_subtrees, void *data) { + struct function *fn = (struct function *) data; + /* If we are reading the lto info back in, we need to rescan the referenced vars. */ if (TREE_CODE (*tp) == SSA_NAME) - add_referenced_var (SSA_NAME_VAR (*tp)); + add_referenced_var_1 (SSA_NAME_VAR (*tp), fn); /* If T is a regular variable that the optimizers are interested in, add it to the list of variables. */ else if (SSA_VAR_P (*tp)) - add_referenced_var (*tp); + add_referenced_var_1 (*tp, fn); /* Type, _DECL and constant nodes have no interesting children. Ignore them. */ @@ -471,16 +472,16 @@ find_referenced_vars_in (gimple stmt) if (gimple_code (stmt) != GIMPLE_PHI) { for (i = 0; i < gimple_num_ops (stmt); i++) - walk_tree (gimple_op_ptr (stmt, i), find_vars_r, NULL, NULL); + walk_tree (gimple_op_ptr (stmt, i), find_vars_r, cfun, NULL); } else { - walk_tree (gimple_phi_result_ptr (stmt), find_vars_r, NULL, NULL); + walk_tree (gimple_phi_result_ptr (stmt), find_vars_r, cfun, NULL); for (i = 0; i < gimple_phi_num_args (stmt); i++) { tree arg = gimple_phi_arg_def (stmt, i); - walk_tree (&arg, find_vars_r, NULL, NULL); + walk_tree (&arg, find_vars_r, cfun, NULL); } } } |