diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-06 22:50:29 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-06 22:50:29 +0000 |
commit | 8aa35772495e9c4a629ae875fec096d03a7c6ae4 (patch) | |
tree | 24e0e22bfb47cd8753027f0806884351901a8e22 /gcc | |
parent | b1fcce272741d6d859d21a887ba5491285baf0e7 (diff) | |
download | gcc-8aa35772495e9c4a629ae875fec096d03a7c6ae4.tar.gz |
* coverage.h (GCOV_TYPE_NODE): Delete.
* coverage.c (coverage_counter_alloc, tree_coverage_counter_ref)
(build_ctr_info_type): Use get_gcov_type () instead of GCOV_TYPE_NODE.
* tree-profile.c (tree_gen_edge_profiler, tree_gen_interval_profiler)
(tree_gen_pow2_profiler, tree_gen_one_value_profiler): Likewise.
* value-prof.c (tree_divmod_fixed_value_transform): Delete.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97760 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/coverage.c | 14 | ||||
-rw-r--r-- | gcc/coverage.h | 2 | ||||
-rw-r--r-- | gcc/tree-profile.c | 133 | ||||
-rw-r--r-- | gcc/value-prof.c | 3 |
5 files changed, 87 insertions, 74 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dd10e852b24..cfca3d6a61e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,14 @@ 2004-04-06 Richard Sandiford <rsandifo@redhat.com> + * coverage.h (GCOV_TYPE_NODE): Delete. + * coverage.c (coverage_counter_alloc, tree_coverage_counter_ref) + (build_ctr_info_type): Use get_gcov_type () instead of GCOV_TYPE_NODE. + * tree-profile.c (tree_gen_edge_profiler, tree_gen_interval_profiler) + (tree_gen_pow2_profiler, tree_gen_one_value_profiler): Likewise. + * value-prof.c (tree_divmod_fixed_value_transform): Delete. + +2004-04-06 Richard Sandiford <rsandifo@redhat.com> + PR other/20792 * Makefile.in (gcc.pot): Remove options.c dependency. * optc-gen.awk: Don't quote help strings with N_(). diff --git a/gcc/coverage.c b/gcc/coverage.c index a5a8f19a7ec..fcab997456a 100644 --- a/gcc/coverage.c +++ b/gcc/coverage.c @@ -392,16 +392,17 @@ coverage_counter_alloc (unsigned counter, unsigned num) /* We don't know the size yet; make it big enough that nobody will make any clever transformation on it. */ char buf[20]; + tree gcov_type_node = get_gcov_type (); tree domain_tree = build_index_type (build_int_cst (NULL_TREE, 1000)); /* replaced later */ tree gcov_type_array_type - = build_array_type (GCOV_TYPE_NODE, domain_tree); + = build_array_type (gcov_type_node, domain_tree); tree_ctr_tables[counter] = build_decl (VAR_DECL, NULL_TREE, gcov_type_array_type); TREE_STATIC (tree_ctr_tables[counter]) = 1; ASM_GENERATE_INTERNAL_LABEL (buf, "LPBX", counter + 1); DECL_NAME (tree_ctr_tables[counter]) = get_identifier (buf); - DECL_ALIGN (tree_ctr_tables[counter]) = TYPE_ALIGN (GCOV_TYPE_NODE); + DECL_ALIGN (tree_ctr_tables[counter]) = TYPE_ALIGN (gcov_type_node); } fn_b_ctrs[counter] = fn_n_ctrs[counter]; fn_n_ctrs[counter] += num; @@ -440,18 +441,19 @@ rtl_coverage_counter_ref (unsigned counter, unsigned no) tree tree_coverage_counter_ref (unsigned counter, unsigned no) { + tree gcov_type_node = get_gcov_type (); tree domain_type = TYPE_DOMAIN (TREE_TYPE (tree_ctr_tables[counter])); gcc_assert (no < fn_n_ctrs[counter] - fn_b_ctrs[counter]); no += prg_n_ctrs[counter] + fn_b_ctrs[counter]; /* "no" here is an array index, scaled to bytes later. */ - return build4 (ARRAY_REF, GCOV_TYPE_NODE, tree_ctr_tables[counter], + return build4 (ARRAY_REF, gcov_type_node, tree_ctr_tables[counter], fold_convert (domain_type, build_int_cst (NULL_TREE, no)), TYPE_MIN_VALUE (domain_type), - size_binop (EXACT_DIV_EXPR, TYPE_SIZE_UNIT (GCOV_TYPE_NODE), - size_int (TYPE_ALIGN_UNIT (GCOV_TYPE_NODE)))); + size_binop (EXACT_DIV_EXPR, TYPE_SIZE_UNIT (gcov_type_node), + size_int (TYPE_ALIGN_UNIT (gcov_type_node)))); } /* Generate a checksum for a string. CHKSUM is the current @@ -685,7 +687,7 @@ build_ctr_info_type (void) { tree type = lang_hooks.types.make_type (RECORD_TYPE); tree field, fields = NULL_TREE; - tree gcov_ptr_type = build_pointer_type (GCOV_TYPE_NODE); + tree gcov_ptr_type = build_pointer_type (get_gcov_type ()); tree gcov_merge_fn_type; /* counters */ diff --git a/gcc/coverage.h b/gcc/coverage.h index d004e234d35..ec33a3cd2df 100644 --- a/gcc/coverage.h +++ b/gcc/coverage.h @@ -49,6 +49,4 @@ extern gcov_type *get_coverage_counts (unsigned /*counter*/, extern tree get_gcov_type (void); -#define GCOV_TYPE_NODE get_gcov_type () - #endif diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c index b588f2d1272..94fbffbeef1 100644 --- a/gcc/tree-profile.c +++ b/gcc/tree-profile.c @@ -61,14 +61,15 @@ tree_init_edge_profiler (void) static void tree_gen_edge_profiler (int edgeno, edge e) { - tree tmp1 = create_tmp_var (GCOV_TYPE_NODE, "PROF"); - tree tmp2 = create_tmp_var (GCOV_TYPE_NODE, "PROF"); + tree gcov_type_node = get_gcov_type (); + tree tmp1 = create_tmp_var (gcov_type_node, "PROF"); + tree tmp2 = create_tmp_var (gcov_type_node, "PROF"); tree ref = tree_coverage_counter_ref (GCOV_COUNTER_ARCS, edgeno); - tree stmt1 = build (MODIFY_EXPR, GCOV_TYPE_NODE, tmp1, ref); - tree stmt2 = build (MODIFY_EXPR, GCOV_TYPE_NODE, tmp2, - build (PLUS_EXPR, GCOV_TYPE_NODE, + tree stmt1 = build (MODIFY_EXPR, gcov_type_node, tmp1, ref); + tree stmt2 = build (MODIFY_EXPR, gcov_type_node, tmp2, + build (PLUS_EXPR, gcov_type_node, tmp1, integer_one_node)); - tree stmt3 = build (MODIFY_EXPR, GCOV_TYPE_NODE, ref, tmp2); + tree stmt3 = build (MODIFY_EXPR, gcov_type_node, ref, tmp2); bsi_insert_on_edge (e, stmt1); bsi_insert_on_edge (e, stmt2); bsi_insert_on_edge (e, stmt3); @@ -95,6 +96,7 @@ tree_gen_interval_profiler (histogram_value value, unsigned tag, unsigned base) tree stmt = value->hvalue.tree.stmt; block_stmt_iterator bsi = bsi_for_stmt (stmt); basic_block bb = bb_for_stmt (stmt); + tree gcov_type_node = get_gcov_type (); tree optype; op = stmt; @@ -143,7 +145,7 @@ tree_gen_interval_profiler (histogram_value value, unsigned tag, unsigned base) bsi_insert_before (&bsi, stmt3, BSI_SAME_STMT); bsi_insert_before (&bsi, stmt4, BSI_SAME_STMT); - index = create_tmp_var (GCOV_TYPE_NODE, "PROF"); + index = create_tmp_var (gcov_type_node, "PROF"); /* Check for too big. */ stmt1 = build3 (COND_EXPR, void_type_node, @@ -167,23 +169,24 @@ tree_gen_interval_profiler (histogram_value value, unsigned tag, unsigned base) /* Normal case, within range. */ label3 = build1 (LABEL_EXPR, void_type_node, label_decl3); bsi_insert_before (&bsi, label3, BSI_SAME_STMT); - stmt1 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, index, - build1 (NOP_EXPR, GCOV_TYPE_NODE, val)); + stmt1 = build2 (MODIFY_EXPR, gcov_type_node, index, + build1 (NOP_EXPR, gcov_type_node, val)); bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT); bb3end = stmt1; /* Too big */ label4 = build1 (LABEL_EXPR, void_type_node, label_decl4); - stmt1 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, index, - build_int_cst (GCOV_TYPE_NODE, value->hdata.intvl.steps)); + stmt1 = build2 (MODIFY_EXPR, gcov_type_node, index, + build_int_cst (gcov_type_node, value->hdata.intvl.steps)); bsi_insert_before (&bsi, label4, BSI_SAME_STMT); bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT); bb4end = stmt1; /* Too small */ label5 = build1 (LABEL_EXPR, void_type_node, label_decl5); - stmt1 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, index, - build_int_cst (GCOV_TYPE_NODE, value->hdata.intvl.steps + 1)); + stmt1 = build2 (MODIFY_EXPR, gcov_type_node, index, + build_int_cst (gcov_type_node, + value->hdata.intvl.steps + 1)); bsi_insert_before (&bsi, label5, BSI_SAME_STMT); bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT); bb5end = stmt1; @@ -192,22 +195,22 @@ tree_gen_interval_profiler (histogram_value value, unsigned tag, unsigned base) label6 = build1 (LABEL_EXPR, void_type_node, label_decl6); bsi_insert_before (&bsi, label6, BSI_SAME_STMT); - tmp1 = create_tmp_var (GCOV_TYPE_NODE, "PROF"); - tmp2 = create_tmp_var (GCOV_TYPE_NODE, "PROF"); - tmp3 = create_tmp_var (GCOV_TYPE_NODE, "PROF"); - stmt1 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, tmp1, - build2 (PLUS_EXPR, GCOV_TYPE_NODE, index, - TREE_OPERAND (ref, 1))); + tmp1 = create_tmp_var (gcov_type_node, "PROF"); + tmp2 = create_tmp_var (gcov_type_node, "PROF"); + tmp3 = create_tmp_var (gcov_type_node, "PROF"); + stmt1 = build2 (MODIFY_EXPR, gcov_type_node, tmp1, + build2 (PLUS_EXPR, gcov_type_node, index, + TREE_OPERAND (ref, 1))); TREE_OPERAND (ref, 1) = tmp1; /* Make a copy to avoid sharing complaints. */ ref2 = build4 (ARRAY_REF, TREE_TYPE (ref), TREE_OPERAND (ref, 0), TREE_OPERAND (ref, 1), TREE_OPERAND (ref, 2), TREE_OPERAND (ref, 3)); - stmt2 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, tmp2, ref); - stmt3 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, tmp3, - build2 (PLUS_EXPR, GCOV_TYPE_NODE, tmp2, integer_one_node)); - stmt4 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, ref2, tmp3); + stmt2 = build2 (MODIFY_EXPR, gcov_type_node, tmp2, ref); + stmt3 = build2 (MODIFY_EXPR, gcov_type_node, tmp3, + build2 (PLUS_EXPR, gcov_type_node, tmp2, integer_one_node)); + stmt4 = build2 (MODIFY_EXPR, gcov_type_node, ref2, tmp3); bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT); bsi_insert_before (&bsi, stmt2, BSI_SAME_STMT); bsi_insert_before (&bsi, stmt3, BSI_SAME_STMT); @@ -259,6 +262,7 @@ tree_gen_pow2_profiler (histogram_value value, unsigned tag, unsigned base) tree stmt = value->hvalue.tree.stmt; block_stmt_iterator bsi = bsi_for_stmt (stmt); basic_block bb = bb_for_stmt (stmt); + tree gcov_type_node = get_gcov_type (); tree optype, optypesigned, optypeunsigned; op = stmt; @@ -289,9 +293,9 @@ tree_gen_pow2_profiler (histogram_value value, unsigned tag, unsigned base) /* Set up variables and check if denominator is negative when considered as signed. */ - index = create_tmp_var (GCOV_TYPE_NODE, "PROF"); + index = create_tmp_var (gcov_type_node, "PROF"); denom = create_tmp_var (optype, "PROF"); - stmt1 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, index, integer_zero_node); + stmt1 = build2 (MODIFY_EXPR, gcov_type_node, index, integer_zero_node); stmt2 = build2 (MODIFY_EXPR, optype, denom, op); if (optypesigned == optype) { @@ -335,8 +339,8 @@ tree_gen_pow2_profiler (histogram_value value, unsigned tag, unsigned base) /* Loop. Increment index, shift denominator, repeat if denominator nonzero. */ label2 = build1 (LABEL_EXPR, void_type_node, label_decl2); - stmt1 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, index, - build2 (PLUS_EXPR, GCOV_TYPE_NODE, index, integer_one_node)); + stmt1 = build2 (MODIFY_EXPR, gcov_type_node, index, + build2 (PLUS_EXPR, gcov_type_node, index, integer_one_node)); if (optypeunsigned == optype) { tmp1 = denom; @@ -364,19 +368,20 @@ tree_gen_pow2_profiler (histogram_value value, unsigned tag, unsigned base) /* Increment the appropriate counter. */ label3 = build1 (LABEL_EXPR, void_type_node, label_decl3); - tmp1 = create_tmp_var (GCOV_TYPE_NODE, "PROF"); - tmp2 = create_tmp_var (GCOV_TYPE_NODE, "PROF"); - tmp3 = create_tmp_var (GCOV_TYPE_NODE, "PROF"); - stmt1 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, tmp1, - build2 (PLUS_EXPR, GCOV_TYPE_NODE, index, TREE_OPERAND (ref, 1))); + tmp1 = create_tmp_var (gcov_type_node, "PROF"); + tmp2 = create_tmp_var (gcov_type_node, "PROF"); + tmp3 = create_tmp_var (gcov_type_node, "PROF"); + stmt1 = build2 (MODIFY_EXPR, gcov_type_node, tmp1, + build2 (PLUS_EXPR, gcov_type_node, + index, TREE_OPERAND (ref, 1))); TREE_OPERAND (ref, 1) = tmp1; /* Make a copy to avoid sharing complaints. */ ref2 = build4 (ARRAY_REF, TREE_TYPE (ref), TREE_OPERAND (ref, 0), TREE_OPERAND (ref, 1), TREE_OPERAND (ref, 2), TREE_OPERAND (ref, 3)); - stmt2 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, tmp2, ref); - stmt3 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, tmp3, - build2 (PLUS_EXPR, GCOV_TYPE_NODE, tmp2, integer_one_node)); - stmt4 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, ref2, tmp3); + stmt2 = build2 (MODIFY_EXPR, gcov_type_node, tmp2, ref); + stmt3 = build2 (MODIFY_EXPR, gcov_type_node, tmp3, + build2 (PLUS_EXPR, gcov_type_node, tmp2, integer_one_node)); + stmt4 = build2 (MODIFY_EXPR, gcov_type_node, ref2, tmp3); bsi_insert_before (&bsi, label3, BSI_SAME_STMT); bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT); bsi_insert_before (&bsi, stmt2, BSI_SAME_STMT); @@ -425,6 +430,7 @@ tree_gen_one_value_profiler (histogram_value value, unsigned tag, unsigned base) tree stmt = value->hvalue.tree.stmt; block_stmt_iterator bsi = bsi_for_stmt (stmt); basic_block bb = bb_for_stmt (stmt); + tree gcov_type_node = get_gcov_type (); tree optype; op = stmt; @@ -440,10 +446,10 @@ tree_gen_one_value_profiler (histogram_value value, unsigned tag, unsigned base) optype = TREE_TYPE (op); /* Check if the stored value matches. */ - tmp1 = create_tmp_var (GCOV_TYPE_NODE, "PROF"); + tmp1 = create_tmp_var (gcov_type_node, "PROF"); tmp2 = create_tmp_var (optype, "PROF"); tmp3 = create_tmp_var (optype, "PROF"); - stmt1 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, tmp1, ref1); + stmt1 = build2 (MODIFY_EXPR, gcov_type_node, tmp1, ref1); stmt2 = build2 (MODIFY_EXPR, optype, tmp2, build1 (NOP_EXPR, optype, tmp1)); stmt3 = build2 (MODIFY_EXPR, optype, tmp3, op); @@ -459,8 +465,8 @@ tree_gen_one_value_profiler (histogram_value value, unsigned tag, unsigned base) /* Does not match; check whether the counter is zero. */ label1 = build1 (LABEL_EXPR, void_type_node, label_decl1); - tmp1 = create_tmp_var (GCOV_TYPE_NODE, "PROF"); - stmt1 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, tmp1, ref2); + tmp1 = create_tmp_var (gcov_type_node, "PROF"); + stmt1 = build2 (MODIFY_EXPR, gcov_type_node, tmp1, ref2); stmt2 = build3 (COND_EXPR, void_type_node, build2 (EQ_EXPR, boolean_type_node, tmp1, integer_zero_node), build1 (GOTO_EXPR, void_type_node, label_decl3), @@ -472,13 +478,12 @@ tree_gen_one_value_profiler (histogram_value value, unsigned tag, unsigned base) /* Counter is not zero yet, decrement. */ label2 = build1 (LABEL_EXPR, void_type_node, label_decl2); - tmp1 = create_tmp_var (GCOV_TYPE_NODE, "PROF"); - tmp2 = create_tmp_var (GCOV_TYPE_NODE, "PROF"); - stmt1 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, tmp1, ref2); - stmt2 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, tmp2, - build (MINUS_EXPR, GCOV_TYPE_NODE, - tmp1, integer_one_node)); - stmt3 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, ref2, tmp2); + tmp1 = create_tmp_var (gcov_type_node, "PROF"); + tmp2 = create_tmp_var (gcov_type_node, "PROF"); + stmt1 = build2 (MODIFY_EXPR, gcov_type_node, tmp1, ref2); + stmt2 = build2 (MODIFY_EXPR, gcov_type_node, tmp2, + build (MINUS_EXPR, gcov_type_node, tmp1, integer_one_node)); + stmt3 = build2 (MODIFY_EXPR, gcov_type_node, ref2, tmp2); bsi_insert_before (&bsi, label2, BSI_SAME_STMT); bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT); bsi_insert_before (&bsi, stmt2, BSI_SAME_STMT); @@ -488,11 +493,11 @@ tree_gen_one_value_profiler (histogram_value value, unsigned tag, unsigned base) /* Counter was zero, store new value. */ label3 = build1 (LABEL_EXPR, void_type_node, label_decl3); tmp1 = create_tmp_var (optype, "PROF"); - tmp2 = create_tmp_var (GCOV_TYPE_NODE, "PROF"); + tmp2 = create_tmp_var (gcov_type_node, "PROF"); stmt1 = build2 (MODIFY_EXPR, optype, tmp1, op); - stmt2 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, tmp2, - build1 (NOP_EXPR, GCOV_TYPE_NODE, tmp1)); - stmt3 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, ref1, tmp2); + stmt2 = build2 (MODIFY_EXPR, gcov_type_node, tmp2, + build1 (NOP_EXPR, gcov_type_node, tmp1)); + stmt3 = build2 (MODIFY_EXPR, gcov_type_node, ref1, tmp2); bsi_insert_before (&bsi, label3, BSI_SAME_STMT); bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT); bsi_insert_before (&bsi, stmt2, BSI_SAME_STMT); @@ -502,13 +507,12 @@ tree_gen_one_value_profiler (histogram_value value, unsigned tag, unsigned base) /* Increment counter. */ label4 = build1 (LABEL_EXPR, void_type_node, label_decl4); - tmp1 = create_tmp_var (GCOV_TYPE_NODE, "PROF"); - tmp2 = create_tmp_var (GCOV_TYPE_NODE, "PROF"); - stmt1 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, tmp1, ref2); - stmt2 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, tmp2, - build (PLUS_EXPR, GCOV_TYPE_NODE, - tmp1, integer_one_node)); - stmt3 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, ref2, tmp2); + tmp1 = create_tmp_var (gcov_type_node, "PROF"); + tmp2 = create_tmp_var (gcov_type_node, "PROF"); + stmt1 = build2 (MODIFY_EXPR, gcov_type_node, tmp1, ref2); + stmt2 = build2 (MODIFY_EXPR, gcov_type_node, tmp2, + build (PLUS_EXPR, gcov_type_node, tmp1, integer_one_node)); + stmt3 = build2 (MODIFY_EXPR, gcov_type_node, ref2, tmp2); bsi_insert_before (&bsi, label4, BSI_SAME_STMT); bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT); bsi_insert_before (&bsi, stmt2, BSI_SAME_STMT); @@ -521,13 +525,12 @@ tree_gen_one_value_profiler (histogram_value value, unsigned tag, unsigned base) it is unable to update them correctly, or because it will duplicate the block or its part). */ label5 = build1 (LABEL_EXPR, void_type_node, label_decl5); - tmp1 = create_tmp_var (GCOV_TYPE_NODE, "PROF"); - tmp2 = create_tmp_var (GCOV_TYPE_NODE, "PROF"); - stmt1 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, tmp1, ref3); - stmt2 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, tmp2, - build (PLUS_EXPR, GCOV_TYPE_NODE, - tmp1, integer_one_node)); - stmt3 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, ref3, tmp2); + tmp1 = create_tmp_var (gcov_type_node, "PROF"); + tmp2 = create_tmp_var (gcov_type_node, "PROF"); + stmt1 = build2 (MODIFY_EXPR, gcov_type_node, tmp1, ref3); + stmt2 = build2 (MODIFY_EXPR, gcov_type_node, tmp2, + build (PLUS_EXPR, gcov_type_node, tmp1, integer_one_node)); + stmt3 = build2 (MODIFY_EXPR, gcov_type_node, ref3, tmp2); bsi_insert_before (&bsi, label5, BSI_SAME_STMT); bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT); bsi_insert_before (&bsi, stmt2, BSI_SAME_STMT); diff --git a/gcc/value-prof.c b/gcc/value-prof.c index 0ef054efc19..26034092dd3 100644 --- a/gcc/value-prof.c +++ b/gcc/value-prof.c @@ -1242,7 +1242,8 @@ tree_divmod_fixed_value_transform (tree stmt) /* Compute probability of taking the optimal path. */ prob = (count * REG_BR_PROB_BASE + all / 2) / all; - tree_val = build_int_cst_wide (GCOV_TYPE_NODE, val & 0xffffffffull, val >> 32); + tree_val = build_int_cst_wide (get_gcov_type (), + val & 0xffffffffull, val >> 32); result = tree_divmod_fixed_value (stmt, op, op1, op2, tree_val, prob, count, all); TREE_OPERAND (modify, 1) = result; |