+2005-01-27 Jeff Law <law@redhat.com>
+
+ * tree-into-ssa.c (ssa_rewrite_initialize_block): Do not register
+ definitions of SSA_NAMEs which are not being rewritten.
+ (rewrite_ssa_into_ssa): Only initialize the current definition
+ of an SSA_NAME if that SSA_NAME has been marked for rewriting.
+ If checking is enabled, assert that SSA_NAME_AUX is clear for all
+ SSA_NAMEs before returning.
+
2005-01-27 Kazu Hirata <kazu@cs.umass.edu>
* c-common.def, c-dump.c, c-gimplify.c, c-objc-common.c,
/* Rewrite a program in Normal form into SSA.
- Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Contributed by Diego Novillo <dnovillo@redhat.com>
This file is part of GCC.
if (abnormal_phi)
SSA_NAME_OCCURS_IN_ABNORMAL_PHI (new_name) = 1;
+ ssa_register_new_def (result, new_name);
}
- else
- new_name = result;
-
- ssa_register_new_def (result, new_name);
}
}
struct mark_def_sites_global_data mark_def_sites_global_data;
unsigned i;
sbitmap snames_to_rename;
- tree name;
bitmap to_rename;
bitmap_iterator bi;
EXECUTE_IF_SET_IN_BITMAP (to_rename, 0, i, bi)
{
SET_BIT (snames_to_rename, i);
+ set_current_def (ssa_name (i), NULL_TREE);
}
mark_def_sites_global_data.kills = sbitmap_alloc (num_ssa_names);
/* We no longer need this bitmap, clear and free it. */
sbitmap_free (mark_def_sites_global_data.kills);
- for (i = 1; i < num_ssa_names; i++)
- if (ssa_name (i))
- set_current_def (ssa_name (i), NULL_TREE);
-
/* Insert PHI nodes at dominance frontiers of definition blocks. */
insert_phi_nodes (dfs, to_rename);
htab_delete (def_blocks);
+#ifdef ENABLE_CHECKING
for (i = 1; i < num_ssa_names; i++)
{
- name = ssa_name (i);
- if (!name || !SSA_NAME_AUX (name))
+ tree name = ssa_name (i);
+ if (!name)
continue;
- free (SSA_NAME_AUX (name));
- SSA_NAME_AUX (name) = NULL;
+ gcc_assert (SSA_NAME_AUX (name) == NULL);
}
+#endif
BITMAP_XFREE (to_rename);