Initialize a BB count in switch lowering.
diff mbox series

Message ID 6ecef58a-f75f-6200-598c-f06577229b10@suse.cz
State New
Headers show
Series
  • Initialize a BB count in switch lowering.
Related show

Commit Message

Martin Liška Dec. 4, 2019, 10:13 a.m. UTC
Hello.

The patch is about missing initialization of a profile count.
Honza investigated with a new profile sanity patch he's been
preparing.

Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
Patch is pre-approved by Honza.

Martin

gcc/ChangeLog:

2019-12-03  Martin Liska  <mliska@suse.cz>

	* tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
	Initialize count of newly created BB.
---
   gcc/tree-switch-conversion.c | 1 +
   1 file changed, 1 insertion(+)

Patch
diff mbox series

diff --git a/gcc/tree-switch-conversion.c b/gcc/tree-switch-conversion.c
index e741f56b520..4940038b125 100644
--- a/gcc/tree-switch-conversion.c
+++ b/gcc/tree-switch-conversion.c
@@ -1829,6 +1829,7 @@  switch_decision_tree::try_switch_expansion (vec<cluster *> &clusters)
     if (clusters[i]->get_type () != SIMPLE_CASE)
       {
 	clusters[i]->m_case_bb = create_empty_bb (bb);
+	clusters[i]->m_case_bb->count = bb->count;
 	clusters[i]->m_case_bb->loop_father = bb->loop_father;
       }