aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2006-08-01 12:02:29 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2006-08-01 10:02:29 +0000
commit9824b8867a2c169ee38947d191ba646786586ae6 (patch)
treeb634ace81030bbcab12da5960a3c610e31ef5109
parent537433677746c80aca27fa1e6f07f6e1e69abb39 (diff)
downloadgcc-9824b8867a2c169ee38947d191ba646786586ae6.zip
gcc-9824b8867a2c169ee38947d191ba646786586ae6.tar.gz
gcc-9824b8867a2c169ee38947d191ba646786586ae6.tar.bz2
tree-outof-ssa.c (check_replaceable): Do not allocate def_vars bitmap when not needed.
* tree-outof-ssa.c (check_replaceable): Do not allocate def_vars bitmap when not needed. * tree-ssa-pre.c (bitmap_set_and, bitmap_set_and_compl): Free temporary bitmaps. From-SVN: r115851
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/tree-outof-ssa.c3
-rw-r--r--gcc/tree-ssa-pre.c3
3 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1df477c..5dc7417 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2006-08-01 Jan Hubicka <jh@suse.cz>
+
+ * tree-outof-ssa.c (check_replaceable): Do not allocate def_vars
+ bitmap when not needed.
+ * tree-ssa-pre.c (bitmap_set_and, bitmap_set_and_compl): Free temporary
+ bitmaps.
+
2006-08-01 Dirk Mueller <dmueller@suse.de>
* tree-vrp.c (fix_equivalence_set): Avoid bitmap memory leak.
diff --git a/gcc/tree-outof-ssa.c b/gcc/tree-outof-ssa.c
index 0366614..ecfd1ee 100644
--- a/gcc/tree-outof-ssa.c
+++ b/gcc/tree-outof-ssa.c
@@ -1556,7 +1556,7 @@ check_replaceable (temp_expr_table_p tab, tree stmt)
var_map map = tab->map;
ssa_op_iter iter;
tree call_expr;
- bitmap def_vars = BITMAP_ALLOC (NULL), use_vars;
+ bitmap def_vars, use_vars;
if (TREE_CODE (stmt) != MODIFY_EXPR)
return false;
@@ -1588,6 +1588,7 @@ check_replaceable (temp_expr_table_p tab, tree stmt)
version = SSA_NAME_VERSION (def);
basevar = SSA_NAME_VAR (def);
+ def_vars = BITMAP_ALLOC (NULL);
bitmap_set_bit (def_vars, DECL_UID (basevar));
/* Add this expression to the dependency list for each use partition. */
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 4c0f2f4..f1383b4 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -624,7 +624,7 @@ bitmap_set_and (bitmap_set_t dest, bitmap_set_t orig)
if (!bitmap_bit_p (dest->values, VALUE_HANDLE_ID (val)))
bitmap_clear_bit (dest->expressions, i);
}
-
+ BITMAP_FREE (temp);
}
/* Perform bitmapped value set operation DEST = DEST & ~ORIG. */
@@ -645,6 +645,7 @@ bitmap_set_and_compl (bitmap_set_t dest, bitmap_set_t orig)
if (!bitmap_bit_p (dest->values, VALUE_HANDLE_ID (val)))
bitmap_clear_bit (dest->expressions, i);
}
+ BITMAP_FREE (temp);
}
/* Return true if the bitmap set SET is empty. */