public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Filip Kastl <pheeck@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/users/pheeck/heads/sccp)] sccp fix: update_stmt now on the new stmt
Date: Tue, 28 Feb 2023 11:51:42 +0000 (GMT)	[thread overview]
Message-ID: <20230228115142.20B853858D33@sourceware.org> (raw)

https://gcc.gnu.org/g:28f460430a0a902e751d63a7ad087bbf5cfa7ea3

commit 28f460430a0a902e751d63a7ad087bbf5cfa7ea3
Author: Filip Kastl <filip.kastl@gmail.com>
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<gimple *> &copy_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

                 reply	other threads:[~2023-02-28 11:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230228115142.20B853858D33@sourceware.org \
    --to=pheeck@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).