summaryrefslogtreecommitdiff
path: root/gcc/basic-block.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/basic-block.h')
-rw-r--r--gcc/basic-block.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/gcc/basic-block.h b/gcc/basic-block.h
index bd242839cf4..e1b19546435 100644
--- a/gcc/basic-block.h
+++ b/gcc/basic-block.h
@@ -87,16 +87,6 @@ enum cfg_edge_flags {
profile.c. */
extern const struct gcov_ctr_summary *profile_info;
-/* Working set size statistics for a given percentage of the entire
- profile (sum_all from the counter summary). */
-typedef struct gcov_working_set_info
-{
- /* Number of hot counters included in this working set. */
- unsigned num_counters;
- /* Smallest counter included in this working set. */
- gcov_type min_counter;
-} gcov_working_set_t;
-
/* Structure to gather statistic about profile consistency, per pass.
An array of this structure, indexed by pass static number, is allocated
in passes.c. The structure is defined here so that different CFG modes
@@ -513,6 +503,11 @@ struct edge_list
#define EDGE_FREQUENCY(e) RDIV ((e)->src->frequency * (e)->probability, \
REG_BR_PROB_BASE)
+/* Compute a scale factor (or probability) suitable for scaling of
+ gcov_type values via apply_probability(). */
+#define GCOV_COMPUTE_SCALE(num,den) \
+ ((den) ? RDIV ((num) * REG_BR_PROB_BASE, (den)) : REG_BR_PROB_BASE)
+
/* Return nonzero if edge is critical. */
#define EDGE_CRITICAL_P(e) (EDGE_COUNT ((e)->src->succs) >= 2 \
&& EDGE_COUNT ((e)->dest->preds) >= 2)
@@ -939,6 +934,7 @@ extern void rtl_profile_for_edge (edge);
extern void default_rtl_profile (void);
/* In profile.c. */
+typedef struct gcov_working_set_info gcov_working_set_t;
extern gcov_working_set_t *find_working_set(unsigned pct_times_10);
/* Check tha probability is sane. */