Commit 4c4503bf by Martin Liska Committed by Martin Liska

Remove dead code in switch conv pass.

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.

From-SVN: r278217
parent e61d0e4e
2019-11-14 Martin Liska <mliska@suse.cz> 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 PR other/92329
* doc/invoke.texi: Document -fallocation-dce. * doc/invoke.texi: Document -fallocation-dce.
...@@ -61,7 +61,7 @@ using namespace tree_switch_conversion; ...@@ -61,7 +61,7 @@ using namespace tree_switch_conversion;
/* Constructor. */ /* 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_constructors (NULL), m_default_values (NULL),
m_arr_ref_first (NULL), m_arr_ref_last (NULL), m_arr_ref_first (NULL), m_arr_ref_last (NULL),
m_reason (NULL), m_default_case_nonstandard (false), m_cfg_altered (false) m_reason (NULL), m_default_case_nonstandard (false), m_cfg_altered (false)
...@@ -89,10 +89,6 @@ switch_conversion::collect (gswitch *swtch) ...@@ -89,10 +89,6 @@ switch_conversion::collect (gswitch *swtch)
e_default = gimple_switch_default_edge (cfun, swtch); e_default = gimple_switch_default_edge (cfun, swtch);
m_default_bb = e_default->dest; m_default_bb = e_default->dest;
m_default_prob = e_default->probability; 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. */ /* Get upper and lower bounds of case values, and the covered range. */
min_case = gimple_switch_label (swtch, 1); min_case = gimple_switch_label (swtch, 1);
......
...@@ -819,12 +819,6 @@ public: ...@@ -819,12 +819,6 @@ public:
/* The probability of the default edge in the replaced switch. */ /* The probability of the default edge in the replaced switch. */
profile_probability m_default_prob; 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). */ /* Number of phi nodes in the final bb (that we'll be replacing). */
int m_phi_count; int m_phi_count;
......
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