From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7879) id 20B853858D33; Tue, 28 Feb 2023 11:51:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 20B853858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677585102; bh=V4cCl2CuCtX0Go1fScNRgzPImiYZM78/tMXrg3Vac3g=; h=From:To:Subject:Date:From; b=sM9haDukkZDqR5C8LKkjeBujlcra7+llZ0VzTE94sZrDDMKzAjqe3092PZOHn4aEm uX1apoziWFPEiJ887yGHA1NL9V9rUytyObMIW/Jm8dtXnFU9aYTj8qbE3ib9BhOb/G rtEdnOpy7J8G6l9y80ZKHd+CiB6bz2LOzcmyHZxs= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Filip Kastl To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/pheeck/heads/sccp)] sccp fix: update_stmt now on the new stmt X-Act-Checkin: gcc X-Git-Author: Filip Kastl X-Git-Refname: refs/users/pheeck/heads/sccp X-Git-Oldrev: e85c306a66ac49cff74882f62267bc28a68d61d7 X-Git-Newrev: 28f460430a0a902e751d63a7ad087bbf5cfa7ea3 Message-Id: <20230228115142.20B853858D33@sourceware.org> Date: Tue, 28 Feb 2023 11:51:42 +0000 (GMT) List-Id: https://gcc.gnu.org/g:28f460430a0a902e751d63a7ad087bbf5cfa7ea3 commit 28f460430a0a902e751d63a7ad087bbf5cfa7ea3 Author: Filip Kastl Date: Tue Feb 28 12:51:34 2023 +0100 sccp fix: update_stmt now on the new stmt Diff: --- gcc/sccp.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/sccp.cc b/gcc/sccp.cc index 33a8ac3795f..6c8791d8724 100644 --- a/gcc/sccp.cc +++ b/gcc/sccp.cc @@ -473,7 +473,7 @@ replace_use_by (tree get_replaced, tree replace_by, bitmap need_eh_cleanup, cleanup_after_replace (use_stmt, gsi_stmt (gsi), need_eh_cleanup, need_ab_cleanup, stmts_to_fixup, false, false); - update_stmt (use_stmt); + update_stmt (gsi_stmt (gsi)); } } @@ -640,6 +640,8 @@ sccp_propagate (auto_vec ©_stmts) /* Remove data structs for cleanup after stmt modification. */ BITMAP_FREE (need_eh_cleanup); BITMAP_FREE (need_ab_cleanup); + vec_free (stmts_to_fixup); + // TODO Should I free the vec? Or is it freed automatically? /* We want to remove dead MEM PHIs because memory is in FUD SSA and the dead