tree-dfa.c (remove_referenced_var): If removing a variable which has subvars...
2007-11-08 Richard Guenther <rguenther@suse.de> * tree-dfa.c (remove_referenced_var): If removing a variable which has subvars, also remove those from the referenced vars. Do not create a variable annotation. From-SVN: r130030
This commit is contained in:
parent
35a3be486a
commit
7d32e17a1a
2 changed files with 20 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2007-11-08 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
* tree-dfa.c (remove_referenced_var): If removing a
|
||||
variable which has subvars, also remove those from
|
||||
the referenced vars. Do not create a variable annotation.
|
||||
|
||||
2007-11-08 Bob Wilson <bob.wilson@acm.org>
|
||||
|
||||
* config/xtensa/xtensa.c (xtensa_expand_prologue): Remove first
|
||||
|
|
|
@ -751,10 +751,22 @@ remove_referenced_var (tree var)
|
|||
struct tree_decl_minimal in;
|
||||
void **loc;
|
||||
unsigned int uid = DECL_UID (var);
|
||||
subvar_t sv;
|
||||
|
||||
/* If we remove a var, we should also remove its subvars, as we kill
|
||||
their parent var and its annotation. */
|
||||
if (var_can_have_subvars (var)
|
||||
&& (sv = get_subvars_for_var (var)))
|
||||
{
|
||||
unsigned int i;
|
||||
tree subvar;
|
||||
for (i = 0; VEC_iterate (tree, sv, i, subvar); ++i)
|
||||
remove_referenced_var (subvar);
|
||||
}
|
||||
|
||||
clear_call_clobbered (var);
|
||||
v_ann = get_var_ann (var);
|
||||
ggc_free (v_ann);
|
||||
if ((v_ann = var_ann (var)))
|
||||
ggc_free (v_ann);
|
||||
var->base.ann = NULL;
|
||||
gcc_assert (DECL_P (var));
|
||||
in.uid = uid;
|
||||
|
|
Loading…
Add table
Reference in a new issue