From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1971) id 12C773858D33; Tue, 17 Oct 2023 14:22:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 12C773858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1697552569; bh=3jOdMgqMFC6zdY62Mb5e6BWkCqtGS3oIfO9tmWv/alk=; h=From:To:Subject:Date:From; b=E24B96F2h1cVHgk8AZdvfZK/uz/VHKKGu79i5eJxx9oot1L1B9okc4EeZvv7XIEan hCvU3UmnwjS1CSM+GMP5CqCm+HOvZOGbP3fooO/b2sHF8EKvjv00EACi4XCEC6qe7E hlg6YU7vvcKjVeUOMtu6IJZDoIG7Qt4rAsvwVGQE= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Andre Simoes Dias Vieira To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-4684] tree-cfg: Add count information when creating new bb in move_sese_region_to_fn X-Act-Checkin: gcc X-Git-Author: Andre Vieira X-Git-Refname: refs/heads/master X-Git-Oldrev: ef6696af08a888b53e0e21b17c0a1f87ffdfc3c6 X-Git-Newrev: 305034e3ae9499264c539ec14529e849eef7d725 Message-Id: <20231017142249.12C773858D33@sourceware.org> Date: Tue, 17 Oct 2023 14:22:49 +0000 (GMT) List-Id: https://gcc.gnu.org/g:305034e3ae9499264c539ec14529e849eef7d725 commit r14-4684-g305034e3ae9499264c539ec14529e849eef7d725 Author: Andre Vieira Date: Tue Oct 17 15:02:29 2023 +0100 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. Diff: --- gcc/tree-cfg.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/tree-cfg.cc b/gcc/tree-cfg.cc index ffab7518b156..ffeb20b717ae 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++) {