diff options
author | Andre Vieira <andre.simoesdiasvieira@arm.com> | 2023-10-17 15:02:29 +0100 |
---|---|---|
committer | Andre Vieira <andre.simoesdiasvieira@arm.com> | 2023-10-17 15:02:29 +0100 |
commit | 305034e3ae9499264c539ec14529e849eef7d725 (patch) | |
tree | 3d028d5539bb62ac66943681b6d23c09fbe19213 /gcc/tree-cfg.cc | |
parent | ef6696af08a888b53e0e21b17c0a1f87ffdfc3c6 (diff) | |
download | gcc-305034e3ae9499264c539ec14529e849eef7d725.zip gcc-305034e3ae9499264c539ec14529e849eef7d725.tar.gz gcc-305034e3ae9499264c539ec14529e849eef7d725.tar.bz2 |
tree-cfg: Add count information when creating new bb in move_sese_region_to_fn
This patch makes sure the profile_count information is initialized for the new
bb created in move_sese_region_to_fn.
gcc/ChangeLog:
* tree-cfg.cc (move_sese_region_to_fn): Initialize profile_count for
new basic block.
Diffstat (limited to 'gcc/tree-cfg.cc')
-rw-r--r-- | gcc/tree-cfg.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/tree-cfg.cc b/gcc/tree-cfg.cc index ffab751..ffeb20b 100644 --- a/gcc/tree-cfg.cc +++ b/gcc/tree-cfg.cc @@ -8160,11 +8160,14 @@ move_sese_region_to_fn (struct function *dest_cfun, basic_block entry_bb, bb = create_empty_bb (entry_pred[0]); if (current_loops) add_bb_to_loop (bb, loop); + profile_count count = profile_count::zero (); for (i = 0; i < num_entry_edges; i++) { e = make_edge (entry_pred[i], bb, entry_flag[i]); e->probability = entry_prob[i]; + count += e->count (); } + bb->count = count; for (i = 0; i < num_exit_edges; i++) { |