Commit 070e3969 by Richard Sandiford Committed by Richard Sandiford

coverage.h (GCOV_TYPE_NODE): Delete.

	* 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.

From-SVN: r97760
parent fb72a0a3
2004-04-06 Richard Sandiford <rsandifo@redhat.com> 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 PR other/20792
* Makefile.in (gcc.pot): Remove options.c dependency. * Makefile.in (gcc.pot): Remove options.c dependency.
* optc-gen.awk: Don't quote help strings with N_(). * optc-gen.awk: Don't quote help strings with N_().
......
...@@ -392,16 +392,17 @@ coverage_counter_alloc (unsigned counter, unsigned num) ...@@ -392,16 +392,17 @@ coverage_counter_alloc (unsigned counter, unsigned num)
/* We don't know the size yet; make it big enough that nobody /* We don't know the size yet; make it big enough that nobody
will make any clever transformation on it. */ will make any clever transformation on it. */
char buf[20]; char buf[20];
tree gcov_type_node = get_gcov_type ();
tree domain_tree tree domain_tree
= build_index_type (build_int_cst (NULL_TREE, 1000)); /* replaced later */ = build_index_type (build_int_cst (NULL_TREE, 1000)); /* replaced later */
tree gcov_type_array_type 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] tree_ctr_tables[counter]
= build_decl (VAR_DECL, NULL_TREE, gcov_type_array_type); = build_decl (VAR_DECL, NULL_TREE, gcov_type_array_type);
TREE_STATIC (tree_ctr_tables[counter]) = 1; TREE_STATIC (tree_ctr_tables[counter]) = 1;
ASM_GENERATE_INTERNAL_LABEL (buf, "LPBX", counter + 1); ASM_GENERATE_INTERNAL_LABEL (buf, "LPBX", counter + 1);
DECL_NAME (tree_ctr_tables[counter]) = get_identifier (buf); 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_b_ctrs[counter] = fn_n_ctrs[counter];
fn_n_ctrs[counter] += num; fn_n_ctrs[counter] += num;
...@@ -440,18 +441,19 @@ rtl_coverage_counter_ref (unsigned counter, unsigned no) ...@@ -440,18 +441,19 @@ rtl_coverage_counter_ref (unsigned counter, unsigned no)
tree tree
tree_coverage_counter_ref (unsigned counter, unsigned no) 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])); tree domain_type = TYPE_DOMAIN (TREE_TYPE (tree_ctr_tables[counter]));
gcc_assert (no < fn_n_ctrs[counter] - fn_b_ctrs[counter]); gcc_assert (no < fn_n_ctrs[counter] - fn_b_ctrs[counter]);
no += prg_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. */ /* "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, fold_convert (domain_type,
build_int_cst (NULL_TREE, no)), build_int_cst (NULL_TREE, no)),
TYPE_MIN_VALUE (domain_type), TYPE_MIN_VALUE (domain_type),
size_binop (EXACT_DIV_EXPR, TYPE_SIZE_UNIT (GCOV_TYPE_NODE), size_binop (EXACT_DIV_EXPR, TYPE_SIZE_UNIT (gcov_type_node),
size_int (TYPE_ALIGN_UNIT (GCOV_TYPE_NODE)))); size_int (TYPE_ALIGN_UNIT (gcov_type_node))));
} }
/* Generate a checksum for a string. CHKSUM is the current /* Generate a checksum for a string. CHKSUM is the current
...@@ -685,7 +687,7 @@ build_ctr_info_type (void) ...@@ -685,7 +687,7 @@ build_ctr_info_type (void)
{ {
tree type = lang_hooks.types.make_type (RECORD_TYPE); tree type = lang_hooks.types.make_type (RECORD_TYPE);
tree field, fields = NULL_TREE; 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; tree gcov_merge_fn_type;
/* counters */ /* counters */
......
...@@ -49,6 +49,4 @@ extern gcov_type *get_coverage_counts (unsigned /*counter*/, ...@@ -49,6 +49,4 @@ extern gcov_type *get_coverage_counts (unsigned /*counter*/,
extern tree get_gcov_type (void); extern tree get_gcov_type (void);
#define GCOV_TYPE_NODE get_gcov_type ()
#endif #endif
...@@ -1242,7 +1242,8 @@ tree_divmod_fixed_value_transform (tree stmt) ...@@ -1242,7 +1242,8 @@ tree_divmod_fixed_value_transform (tree stmt)
/* Compute probability of taking the optimal path. */ /* Compute probability of taking the optimal path. */
prob = (count * REG_BR_PROB_BASE + all / 2) / all; 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); result = tree_divmod_fixed_value (stmt, op, op1, op2, tree_val, prob, count, all);
TREE_OPERAND (modify, 1) = result; TREE_OPERAND (modify, 1) = result;
......
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