tree-ssa-pre.c (bitmap_value_insert_into_set): Optimize.

2010-01-05  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-pre.c (bitmap_value_insert_into_set): Optimize.

From-SVN: r155643
This commit is contained in:
Richard Guenther 2010-01-05 10:53:11 +00:00 committed by Richard Biener
parent 7604eb4e07
commit 1befacc8c5
2 changed files with 15 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2010-01-05 Richard Guenther <rguenther@suse.de>
* tree-ssa-pre.c (bitmap_value_insert_into_set): Optimize.
2010-01-05 Jakub Jelinek <jakub@redhat.com>
PR other/42611

View File

@ -867,8 +867,17 @@ bitmap_value_insert_into_set (bitmap_set_t set, pre_expr expr)
{
unsigned int val = get_expr_value_id (expr);
if (!bitmap_set_contains_value (set, val))
bitmap_insert_into_set_1 (set, expr, val, false);
#ifdef ENABLE_CHECKING
gcc_assert (expr->id == get_or_alloc_expression_id (expr));
#endif
/* Constant values are always considered to be part of the set. */
if (value_id_constant_p (val))
return;
/* If the value membership changed, add the expression. */
if (bitmap_set_bit (set->values, val))
bitmap_set_bit (set->expressions, expr->id);
}
/* Print out EXPR to outfile. */