aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2019-11-14 13:04:45 +0100
committerMartin Liska <marxin@gcc.gnu.org>2019-11-14 12:04:45 +0000
commit4c4503bf8c538bdbd8db8940aae3d7000885776e (patch)
treeb0e84a86c738beb7f38709c7e6401d61fd3faf19 /gcc
parente61d0e4e2ed8170491e7dfe597340f86a75a31cd (diff)
downloadgcc-4c4503bf8c538bdbd8db8940aae3d7000885776e.zip
gcc-4c4503bf8c538bdbd8db8940aae3d7000885776e.tar.gz
gcc-4c4503bf8c538bdbd8db8940aae3d7000885776e.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/tree-switch-conversion.c6
-rw-r--r--gcc/tree-switch-conversion.h6
3 files changed, 9 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6060edf..6b77d87 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,13 @@
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
* doc/invoke.texi: Document -fallocation-dce.
diff --git a/gcc/tree-switch-conversion.c b/gcc/tree-switch-conversion.c
index af4fd5e..e741f56 100644
--- a/gcc/tree-switch-conversion.c
+++ b/gcc/tree-switch-conversion.c
@@ -61,7 +61,7 @@ using namespace tree_switch_conversion;
/* 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)
@@ -89,10 +89,6 @@ switch_conversion::collect (gswitch *swtch)
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);
diff --git a/gcc/tree-switch-conversion.h b/gcc/tree-switch-conversion.h
index c58bcce..a0639fc 100644
--- a/gcc/tree-switch-conversion.h
+++ b/gcc/tree-switch-conversion.h
@@ -819,12 +819,6 @@ public:
/* 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;