aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c73
1 files changed, 30 insertions, 43 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 978b854..f6b72b7 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -14686,7 +14686,7 @@ fold (tree expr)
#undef fold
static void fold_checksum_tree (const_tree, struct md5_ctx *,
- hash_table <pointer_hash <tree_node> >);
+ hash_table<pointer_hash<tree_node> > *);
static void fold_check_failed (const_tree, const_tree);
void print_fold_checksum (const_tree);
@@ -14700,20 +14700,18 @@ fold (tree expr)
tree ret;
struct md5_ctx ctx;
unsigned char checksum_before[16], checksum_after[16];
- hash_table <pointer_hash <tree_node> > ht;
+ hash_table<pointer_hash<tree_node> > ht (32);
- ht.create (32);
md5_init_ctx (&ctx);
- fold_checksum_tree (expr, &ctx, ht);
+ fold_checksum_tree (expr, &ctx, &ht);
md5_finish_ctx (&ctx, checksum_before);
ht.empty ();
ret = fold_1 (expr);
md5_init_ctx (&ctx);
- fold_checksum_tree (expr, &ctx, ht);
+ fold_checksum_tree (expr, &ctx, &ht);
md5_finish_ctx (&ctx, checksum_after);
- ht.dispose ();
if (memcmp (checksum_before, checksum_after, 16))
fold_check_failed (expr, ret);
@@ -14726,13 +14724,11 @@ print_fold_checksum (const_tree expr)
{
struct md5_ctx ctx;
unsigned char checksum[16], cnt;
- hash_table <pointer_hash <tree_node> > ht;
+ hash_table<pointer_hash<tree_node> > ht (32);
- ht.create (32);
md5_init_ctx (&ctx);
- fold_checksum_tree (expr, &ctx, ht);
+ fold_checksum_tree (expr, &ctx, &ht);
md5_finish_ctx (&ctx, checksum);
- ht.dispose ();
for (cnt = 0; cnt < 16; ++cnt)
fprintf (stderr, "%02x", checksum[cnt]);
putc ('\n', stderr);
@@ -14746,7 +14742,7 @@ fold_check_failed (const_tree expr ATTRIBUTE_UNUSED, const_tree ret ATTRIBUTE_UN
static void
fold_checksum_tree (const_tree expr, struct md5_ctx *ctx,
- hash_table <pointer_hash <tree_node> > ht)
+ hash_table<pointer_hash <tree_node> > *ht)
{
tree_node **slot;
enum tree_code code;
@@ -14756,7 +14752,7 @@ fold_checksum_tree (const_tree expr, struct md5_ctx *ctx,
recursive_label:
if (expr == NULL)
return;
- slot = ht.find_slot (expr, INSERT);
+ slot = ht->find_slot (expr, INSERT);
if (*slot != NULL)
return;
*slot = CONST_CAST_TREE (expr);
@@ -14903,11 +14899,10 @@ debug_fold_checksum (const_tree t)
int i;
unsigned char checksum[16];
struct md5_ctx ctx;
- hash_table <pointer_hash <tree_node> > ht;
- ht.create (32);
+ hash_table<pointer_hash<tree_node> > ht (32);
md5_init_ctx (&ctx);
- fold_checksum_tree (t, &ctx, ht);
+ fold_checksum_tree (t, &ctx, &ht);
md5_finish_ctx (&ctx, checksum);
ht.empty ();
@@ -14932,11 +14927,10 @@ fold_build1_stat_loc (location_t loc,
#ifdef ENABLE_FOLD_CHECKING
unsigned char checksum_before[16], checksum_after[16];
struct md5_ctx ctx;
- hash_table <pointer_hash <tree_node> > ht;
+ hash_table<pointer_hash<tree_node> > ht (32);
- ht.create (32);
md5_init_ctx (&ctx);
- fold_checksum_tree (op0, &ctx, ht);
+ fold_checksum_tree (op0, &ctx, &ht);
md5_finish_ctx (&ctx, checksum_before);
ht.empty ();
#endif
@@ -14947,9 +14941,8 @@ fold_build1_stat_loc (location_t loc,
#ifdef ENABLE_FOLD_CHECKING
md5_init_ctx (&ctx);
- fold_checksum_tree (op0, &ctx, ht);
+ fold_checksum_tree (op0, &ctx, &ht);
md5_finish_ctx (&ctx, checksum_after);
- ht.dispose ();
if (memcmp (checksum_before, checksum_after, 16))
fold_check_failed (op0, tem);
@@ -14975,16 +14968,15 @@ fold_build2_stat_loc (location_t loc,
checksum_after_op0[16],
checksum_after_op1[16];
struct md5_ctx ctx;
- hash_table <pointer_hash <tree_node> > ht;
+ hash_table<pointer_hash<tree_node> > ht (32);
- ht.create (32);
md5_init_ctx (&ctx);
- fold_checksum_tree (op0, &ctx, ht);
+ fold_checksum_tree (op0, &ctx, &ht);
md5_finish_ctx (&ctx, checksum_before_op0);
ht.empty ();
md5_init_ctx (&ctx);
- fold_checksum_tree (op1, &ctx, ht);
+ fold_checksum_tree (op1, &ctx, &ht);
md5_finish_ctx (&ctx, checksum_before_op1);
ht.empty ();
#endif
@@ -14995,7 +14987,7 @@ fold_build2_stat_loc (location_t loc,
#ifdef ENABLE_FOLD_CHECKING
md5_init_ctx (&ctx);
- fold_checksum_tree (op0, &ctx, ht);
+ fold_checksum_tree (op0, &ctx, &ht);
md5_finish_ctx (&ctx, checksum_after_op0);
ht.empty ();
@@ -15003,9 +14995,8 @@ fold_build2_stat_loc (location_t loc,
fold_check_failed (op0, tem);
md5_init_ctx (&ctx);
- fold_checksum_tree (op1, &ctx, ht);
+ fold_checksum_tree (op1, &ctx, &ht);
md5_finish_ctx (&ctx, checksum_after_op1);
- ht.dispose ();
if (memcmp (checksum_before_op1, checksum_after_op1, 16))
fold_check_failed (op1, tem);
@@ -15031,21 +15022,20 @@ fold_build3_stat_loc (location_t loc, enum tree_code code, tree type,
checksum_after_op1[16],
checksum_after_op2[16];
struct md5_ctx ctx;
- hash_table <pointer_hash <tree_node> > ht;
+ hash_table<pointer_hash<tree_node> > ht (32);
- ht.create (32);
md5_init_ctx (&ctx);
- fold_checksum_tree (op0, &ctx, ht);
+ fold_checksum_tree (op0, &ctx, &ht);
md5_finish_ctx (&ctx, checksum_before_op0);
ht.empty ();
md5_init_ctx (&ctx);
- fold_checksum_tree (op1, &ctx, ht);
+ fold_checksum_tree (op1, &ctx, &ht);
md5_finish_ctx (&ctx, checksum_before_op1);
ht.empty ();
md5_init_ctx (&ctx);
- fold_checksum_tree (op2, &ctx, ht);
+ fold_checksum_tree (op2, &ctx, &ht);
md5_finish_ctx (&ctx, checksum_before_op2);
ht.empty ();
#endif
@@ -15057,7 +15047,7 @@ fold_build3_stat_loc (location_t loc, enum tree_code code, tree type,
#ifdef ENABLE_FOLD_CHECKING
md5_init_ctx (&ctx);
- fold_checksum_tree (op0, &ctx, ht);
+ fold_checksum_tree (op0, &ctx, &ht);
md5_finish_ctx (&ctx, checksum_after_op0);
ht.empty ();
@@ -15065,7 +15055,7 @@ fold_build3_stat_loc (location_t loc, enum tree_code code, tree type,
fold_check_failed (op0, tem);
md5_init_ctx (&ctx);
- fold_checksum_tree (op1, &ctx, ht);
+ fold_checksum_tree (op1, &ctx, &ht);
md5_finish_ctx (&ctx, checksum_after_op1);
ht.empty ();
@@ -15073,9 +15063,8 @@ fold_build3_stat_loc (location_t loc, enum tree_code code, tree type,
fold_check_failed (op1, tem);
md5_init_ctx (&ctx);
- fold_checksum_tree (op2, &ctx, ht);
+ fold_checksum_tree (op2, &ctx, &ht);
md5_finish_ctx (&ctx, checksum_after_op2);
- ht.dispose ();
if (memcmp (checksum_before_op2, checksum_after_op2, 16))
fold_check_failed (op2, tem);
@@ -15099,18 +15088,17 @@ fold_build_call_array_loc (location_t loc, tree type, tree fn,
checksum_after_fn[16],
checksum_after_arglist[16];
struct md5_ctx ctx;
- hash_table <pointer_hash <tree_node> > ht;
+ hash_table<pointer_hash<tree_node> > ht (32);
int i;
- ht.create (32);
md5_init_ctx (&ctx);
- fold_checksum_tree (fn, &ctx, ht);
+ fold_checksum_tree (fn, &ctx, &ht);
md5_finish_ctx (&ctx, checksum_before_fn);
ht.empty ();
md5_init_ctx (&ctx);
for (i = 0; i < nargs; i++)
- fold_checksum_tree (argarray[i], &ctx, ht);
+ fold_checksum_tree (argarray[i], &ctx, &ht);
md5_finish_ctx (&ctx, checksum_before_arglist);
ht.empty ();
#endif
@@ -15119,7 +15107,7 @@ fold_build_call_array_loc (location_t loc, tree type, tree fn,
#ifdef ENABLE_FOLD_CHECKING
md5_init_ctx (&ctx);
- fold_checksum_tree (fn, &ctx, ht);
+ fold_checksum_tree (fn, &ctx, &ht);
md5_finish_ctx (&ctx, checksum_after_fn);
ht.empty ();
@@ -15128,9 +15116,8 @@ fold_build_call_array_loc (location_t loc, tree type, tree fn,
md5_init_ctx (&ctx);
for (i = 0; i < nargs; i++)
- fold_checksum_tree (argarray[i], &ctx, ht);
+ fold_checksum_tree (argarray[i], &ctx, &ht);
md5_finish_ctx (&ctx, checksum_after_arglist);
- ht.dispose ();
if (memcmp (checksum_before_arglist, checksum_after_arglist, 16))
fold_check_failed (NULL_TREE, tem);