diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 18 | ||||
-rw-r--r-- | gcc/ipa-struct-reorg.c | 2 | ||||
-rw-r--r-- | gcc/tree-dfa.c | 4 | ||||
-rw-r--r-- | gcc/tree-flow-inline.h | 4 | ||||
-rw-r--r-- | gcc/tree-flow.h | 6 | ||||
-rw-r--r-- | gcc/tree-into-ssa.c | 6 | ||||
-rw-r--r-- | gcc/tree-sra.c | 2 | ||||
-rw-r--r-- | gcc/tree-ssa-alias.c | 2 | ||||
-rw-r--r-- | gcc/tree-ssa-live.c | 4 | ||||
-rw-r--r-- | gcc/tree-ssa.c | 2 | ||||
-rw-r--r-- | gcc/tree-ssanames.c | 2 | ||||
-rw-r--r-- | gcc/tree-tailcall.c | 4 |
12 files changed, 37 insertions, 19 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cc9ed6b..3eea0bc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -2,6 +2,24 @@ PR debug/47106 PR debug/47402 + * tree-flow.h (FOR_EACH_REFERENCED_VAR): Add FN argument. + Adjust all users. Pass FN to... + * tree-flow-inline.h (first_referenced_var): ... this. Add + fn argument. + * ipa-struct-reorg.c: Adjust. + * tree-dfa.c: Adjust. + * tree-into-ssa.c: Adjust. + * tree-sra.c: Adjust. + * tree-ssa-alias.c: Adjust. + * tree-ssa-live.c: Adjust. + * tree-ssa.c: Adjust. + * tree-ssanames.c: Adjust. + * tree-tailcall.c: Adjust. + +2011-02-15 Alexandre Oliva <aoliva@redhat.com> + + PR debug/47106 + PR debug/47402 * tree-flow.h (referenced_var_lookup): Add fn parameter. Adjust all callers. * tree-dfa.c (referenced_var_lookup): Use fn instead of cfun. diff --git a/gcc/ipa-struct-reorg.c b/gcc/ipa-struct-reorg.c index ae18da2..7ab321e 100644 --- a/gcc/ipa-struct-reorg.c +++ b/gcc/ipa-struct-reorg.c @@ -2712,7 +2712,7 @@ create_new_local_vars (void) new_local_vars = htab_create (num_referenced_vars, new_var_hash, new_var_eq, NULL); - FOR_EACH_REFERENCED_VAR (var, rvi) + FOR_EACH_REFERENCED_VAR (cfun, var, rvi) { if (!is_global_var (var)) create_new_var (var, new_local_vars); diff --git a/gcc/tree-dfa.c b/gcc/tree-dfa.c index f37c30f..6490c5e 100644 --- a/gcc/tree-dfa.c +++ b/gcc/tree-dfa.c @@ -218,7 +218,7 @@ dump_referenced_vars (FILE *file) fprintf (file, "\nReferenced variables in %s: %u\n\n", get_name (current_function_decl), (unsigned) num_referenced_vars); - FOR_EACH_REFERENCED_VAR (var, rvi) + FOR_EACH_REFERENCED_VAR (cfun, var, rvi) { fprintf (file, "Variable: "); dump_variable (file, var); @@ -400,7 +400,7 @@ collect_dfa_stats (struct dfa_stats_d *dfa_stats_p ATTRIBUTE_UNUSED) memset ((void *)dfa_stats_p, 0, sizeof (struct dfa_stats_d)); /* Count all the variable annotations. */ - FOR_EACH_REFERENCED_VAR (var, vi) + FOR_EACH_REFERENCED_VAR (cfun, var, vi) if (var_ann (var)) dfa_stats_p->num_var_anns++; diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h index 538d6fe..8656610 100644 --- a/gcc/tree-flow-inline.h +++ b/gcc/tree-flow-inline.h @@ -112,10 +112,10 @@ referenced_var (unsigned int uid) referenced_vars hashtable, and return that variable. */ static inline tree -first_referenced_var (referenced_var_iterator *iter) +first_referenced_var (struct function *fn, referenced_var_iterator *iter) { return (tree) first_htab_element (&iter->hti, - gimple_referenced_vars (cfun)); + gimple_referenced_vars (fn)); } /* Return true if we have hit the end of the referenced variables ITER is diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h index e170037..14c8827 100644 --- a/gcc/tree-flow.h +++ b/gcc/tree-flow.h @@ -314,9 +314,9 @@ typedef struct to the hashtable while using this macro. Doing so may cause it to behave erratically. */ -#define FOR_EACH_REFERENCED_VAR(VAR, ITER) \ - for ((VAR) = first_referenced_var (&(ITER)); \ - !end_referenced_vars_p (&(ITER)); \ +#define FOR_EACH_REFERENCED_VAR(FN, VAR, ITER) \ + for ((VAR) = first_referenced_var ((FN), &(ITER)); \ + !end_referenced_vars_p (&(ITER)); \ (VAR) = next_referenced_var (&(ITER))) extern tree referenced_var_lookup (struct function *, unsigned int); diff --git a/gcc/tree-into-ssa.c b/gcc/tree-into-ssa.c index 5f6ea19..74386e4 100644 --- a/gcc/tree-into-ssa.c +++ b/gcc/tree-into-ssa.c @@ -1156,7 +1156,7 @@ insert_phi_nodes (bitmap_head *dfs) differences but no UID ordering differences. */ vars = BITMAP_ALLOC (NULL); - FOR_EACH_REFERENCED_VAR (var, rvi) + FOR_EACH_REFERENCED_VAR (cfun, var, rvi) { struct def_blocks_d *def_map; @@ -1573,7 +1573,7 @@ dump_currdefs (FILE *file) tree var; fprintf (file, "\n\nCurrent reaching definitions\n\n"); - FOR_EACH_REFERENCED_VAR (var, i) + FOR_EACH_REFERENCED_VAR (cfun, var, i) if (SYMS_TO_RENAME (cfun) == NULL || bitmap_bit_p (SYMS_TO_RENAME (cfun), DECL_UID (var))) { @@ -2313,7 +2313,7 @@ init_ssa_renamer (void) def_blocks = htab_create (num_referenced_vars, def_blocks_hash, def_blocks_eq, def_blocks_free); - FOR_EACH_REFERENCED_VAR(var, rvi) + FOR_EACH_REFERENCED_VAR (cfun, var, rvi) set_current_def (var, NULL_TREE); } diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index 27cb303..8ed8771 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -1540,7 +1540,7 @@ find_var_candidates (void) referenced_var_iterator rvi; bool ret = false; - FOR_EACH_REFERENCED_VAR (var, rvi) + FOR_EACH_REFERENCED_VAR (cfun, var, rvi) { if (TREE_CODE (var) != VAR_DECL && TREE_CODE (var) != PARM_DECL) continue; diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index 78275de..68321d2 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -364,7 +364,7 @@ dump_alias_info (FILE *file) fprintf (file, "Aliased symbols\n\n"); - FOR_EACH_REFERENCED_VAR (var, rvi) + FOR_EACH_REFERENCED_VAR (cfun, var, rvi) { if (may_be_aliased (var)) dump_variable (file, var); diff --git a/gcc/tree-ssa-live.c b/gcc/tree-ssa-live.c index d917bb9..0441df6 100644 --- a/gcc/tree-ssa-live.c +++ b/gcc/tree-ssa-live.c @@ -705,7 +705,7 @@ remove_unused_locals (void) mark_scope_block_unused (DECL_INITIAL (current_function_decl)); /* Assume all locals are unused. */ - FOR_EACH_REFERENCED_VAR (t, rvi) + FOR_EACH_REFERENCED_VAR (cfun, t, rvi) clear_is_used (t); /* Walk the CFG marking all referenced symbols. */ @@ -821,7 +821,7 @@ remove_unused_locals (void) } /* Remove unused variables from REFERENCED_VARs. */ - FOR_EACH_REFERENCED_VAR (t, rvi) + FOR_EACH_REFERENCED_VAR (cfun, t, rvi) if (!is_global_var (t) && TREE_CODE (t) != PARM_DECL && TREE_CODE (t) != RESULT_DECL diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c index a787f71..5c9e0d8 100644 --- a/gcc/tree-ssa.c +++ b/gcc/tree-ssa.c @@ -1157,7 +1157,7 @@ delete_tree_ssa (void) tree var; /* Remove annotations from every referenced local variable. */ - FOR_EACH_REFERENCED_VAR (var, rvi) + FOR_EACH_REFERENCED_VAR (cfun, var, rvi) { if (is_global_var (var)) continue; diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c index cf67f6c..c76dba5e 100644 --- a/gcc/tree-ssanames.c +++ b/gcc/tree-ssanames.c @@ -340,7 +340,7 @@ release_dead_ssa_names (void) /* Current defs point to various dead SSA names that in turn point to eventually dead variables so a bunch of memory is held live. */ - FOR_EACH_REFERENCED_VAR (t, rvi) + FOR_EACH_REFERENCED_VAR (cfun, t, rvi) set_current_def (t, NULL); /* Now release the freelist. */ for (t = FREE_SSANAMES (cfun); t; t = next) diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c index a9bf628..85aa82b 100644 --- a/gcc/tree-tailcall.c +++ b/gcc/tree-tailcall.c @@ -481,7 +481,7 @@ find_tail_calls (basic_block bb, struct tailcall **ret) /* Make sure the tail invocation of this function does not refer to local variables. */ - FOR_EACH_REFERENCED_VAR (var, rvi) + FOR_EACH_REFERENCED_VAR (cfun, var, rvi) { if (TREE_CODE (var) != PARM_DECL && auto_var_in_fn_p (var, cfun->decl) @@ -889,7 +889,7 @@ add_virtual_phis (void) this, we cannot do much better than to rebuild the ssa form for possibly affected virtual ssa names from scratch. */ - FOR_EACH_REFERENCED_VAR (var, rvi) + FOR_EACH_REFERENCED_VAR (cfun, var, rvi) { if (!is_gimple_reg (var) && gimple_default_def (cfun, var) != NULL_TREE) mark_sym_for_renaming (var); |