Commit 3d569e76 by Jeff Law Committed by Jeff Law

Re: [PATCH] Minor refactoring in tree-ssanames.c & freelists verifier

	* tree-ssanames.c (verify_ssaname_freelists): Simplify check for
	being in gimple/ssa form.  Remove redundant check for SSA_NAME.
	Fix comment typo.

From-SVN: r230049
parent 4483f3ee
2015-11-09 Jeff Law <law@redhat.com>
* tree-ssanames.c (verify_ssaname_freelists): Simplify check for
being in gimple/ssa form. Remove redundant check for SSA_NAME.
Fix comment typo.
2015-11-09 Michael Meissner <meissner@linux.vnet.ibm.com> 2015-11-09 Michael Meissner <meissner@linux.vnet.ibm.com>
* config/rs6000/rs6000.opt (-mpower9-fusion): Add new switches for * config/rs6000/rs6000.opt (-mpower9-fusion): Add new switches for
...@@ -124,17 +124,13 @@ ssanames_print_statistics (void) ...@@ -124,17 +124,13 @@ ssanames_print_statistics (void)
DEBUG_FUNCTION void DEBUG_FUNCTION void
verify_ssaname_freelists (struct function *fun) verify_ssaname_freelists (struct function *fun)
{ {
/* Do nothing if we are in RTL format. */ if (!gimple_in_ssa_p (fun))
basic_block bb; return;
FOR_EACH_BB_FN (bb, fun)
{
if (bb->flags & BB_RTL)
return;
}
bitmap names_in_il = BITMAP_ALLOC (NULL); bitmap names_in_il = BITMAP_ALLOC (NULL);
/* Walk the entire IL noting every SSA_NAME we see. */ /* Walk the entire IL noting every SSA_NAME we see. */
basic_block bb;
FOR_EACH_BB_FN (bb, fun) FOR_EACH_BB_FN (bb, fun)
{ {
tree t; tree t;
...@@ -163,8 +159,7 @@ verify_ssaname_freelists (struct function *fun) ...@@ -163,8 +159,7 @@ verify_ssaname_freelists (struct function *fun)
ssa_op_iter iter; ssa_op_iter iter;
gimple *stmt = gsi_stmt (gsi); gimple *stmt = gsi_stmt (gsi);
FOR_EACH_SSA_TREE_OPERAND (t, stmt, iter, SSA_OP_ALL_OPERANDS) FOR_EACH_SSA_TREE_OPERAND (t, stmt, iter, SSA_OP_ALL_OPERANDS)
if (TREE_CODE (t) == SSA_NAME) bitmap_set_bit (names_in_il, SSA_NAME_VERSION (t));
bitmap_set_bit (names_in_il, SSA_NAME_VERSION (t));
} }
} }
...@@ -218,7 +213,7 @@ verify_ssaname_freelists (struct function *fun) ...@@ -218,7 +213,7 @@ verify_ssaname_freelists (struct function *fun)
debug/non-debug compilations have the same SSA_NAMEs. So for each debug/non-debug compilations have the same SSA_NAMEs. So for each
lost SSA_NAME, see if it's likely one from that wart. These will always lost SSA_NAME, see if it's likely one from that wart. These will always
be marked as default definitions. So we loosely assume that anything be marked as default definitions. So we loosely assume that anything
marked as a default definition isn't leaked by pretening they are marked as a default definition isn't leaked by pretending they are
in the IL. */ in the IL. */
for (unsigned int i = UNUSED_NAME_VERSION + 1; i < num_ssa_names; i++) for (unsigned int i = UNUSED_NAME_VERSION + 1; i < num_ssa_names; i++)
if (ssa_name (i) && SSA_NAME_IS_DEFAULT_DEF (ssa_name (i))) if (ssa_name (i) && SSA_NAME_IS_DEFAULT_DEF (ssa_name (i)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment