+2019-11-14 Martin Liska <mliska@suse.cz>
+
+ * tree-switch-conversion.c (switch_conversion::switch_conversion):
+ Do not initialize m_other_count.
+ (switch_conversion::collect): Do not count m_default_count and
+ m_other_count as we use frequencies for edges.
+ * tree-switch-conversion.h: Remove m_default_count and m_other_count.
+
2019-11-14 Martin Liska <mliska@suse.cz>
PR other/92329
/* Constructor. */
-switch_conversion::switch_conversion (): m_final_bb (NULL), m_other_count (),
+switch_conversion::switch_conversion (): m_final_bb (NULL),
m_constructors (NULL), m_default_values (NULL),
m_arr_ref_first (NULL), m_arr_ref_last (NULL),
m_reason (NULL), m_default_case_nonstandard (false), m_cfg_altered (false)
e_default = gimple_switch_default_edge (cfun, swtch);
m_default_bb = e_default->dest;
m_default_prob = e_default->probability;
- m_default_count = e_default->count ();
- FOR_EACH_EDGE (e, ei, m_switch_bb->succs)
- if (e != e_default)
- m_other_count += e->count ();
/* Get upper and lower bounds of case values, and the covered range. */
min_case = gimple_switch_label (swtch, 1);
/* The probability of the default edge in the replaced switch. */
profile_probability m_default_prob;
- /* The count of the default edge in the replaced switch. */
- profile_count m_default_count;
-
- /* Combined count of all other (non-default) edges in the replaced switch. */
- profile_count m_other_count;
-
/* Number of phi nodes in the final bb (that we'll be replacing). */
int m_phi_count;