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)] TEST 002 still has diff tests; going to rework cleaning up
Date: Thu, 23 Feb 2023 14:05:04 +0000 (GMT)	[thread overview]
Message-ID: <20230223140504.346C63858C5E@sourceware.org> (raw)

https://gcc.gnu.org/g:f1802c66a88ed5009592470c80bf07672b54c681

commit f1802c66a88ed5009592470c80bf07672b54c681
Author: Filip Kastl <filip.kastl@gmail.com>
Date:   Thu Feb 23 15:04:56 2023 +0100

    TEST 002 still has diff tests; going to rework cleaning up

Diff:
---
 gcc/sccp.cc | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/gcc/sccp.cc b/gcc/sccp.cc
index aeed5b822d3..da8b38e6971 100644
--- a/gcc/sccp.cc
+++ b/gcc/sccp.cc
@@ -35,6 +35,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "ssa-iterators.h"
 #include "gimple-fold.h"
 #include "gimplify.h"
+#include "tree-cfg.h"
 
 // DEBUG
 #include <iostream>
@@ -443,12 +444,6 @@ tarjan_compute_sccs (auto_vec<gimple *> &copy_stmts)
   return sccs;
 }
 
-static bool
-may_propagate (tree get_replaced, tree replace_by)
-{
-  return true;
-}
-
 static void
 replace_use_by (tree get_replaced, tree replace_by)
 {
@@ -494,9 +489,7 @@ replace_scc_by_value (vec<gimple *> scc, tree replace_by)
   for (gimple *stmt : scc)
     {
       tree get_replaced = gimple_get_lhs (stmt);
-
-      if (may_propagate (get_replaced, replace_by))
-	replace_use_by (get_replaced, replace_by);
+      replace_use_by (get_replaced, replace_by);
     }
 }
 
@@ -694,6 +687,11 @@ init_sccp (void)
 static void
 finalize_sccp (void)
 {
+  basic_block bb;
+  FOR_EACH_BB_FN (bb, cfun)
+    {
+      gimple_purge_dead_eh_edges (bb);
+    }
 }
 
 namespace {

                 reply	other threads:[~2023-02-23 14:05 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=20230223140504.346C63858C5E@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).