public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-373] rtl-optimization/105577 - RTL DSE and non-call EH
@ 2022-05-12 13:05 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2022-05-12 13:05 UTC (permalink / raw)
  To: gcc-cvs

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

commit r13-373-gdfda40f8147412328f699628a54b0aaa584776e7
Author: Richard Biener <rguenther@suse.de>
Date:   Thu May 12 14:03:32 2022 +0200

    rtl-optimization/105577 - RTL DSE and non-call EH
    
    When one of the first two stages of DSE removes a throwing stmt
    we have to purge dead EH edges before the DF re-analyze fires off
    a fast DCE since that cannot cope with the situation.
    
    2022-05-12  Richard Biener  <rguenther@suse.de>
    
            PR rtl-optimization/105577
            * dse.cc (rest_of_handle_dse): Make sure to purge dead EH
            edges before running fast DCE via df_analyze.

Diff:
---
 gcc/dse.cc | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/gcc/dse.cc b/gcc/dse.cc
index a58c17e0ccb..30c11cee034 100644
--- a/gcc/dse.cc
+++ b/gcc/dse.cc
@@ -3682,6 +3682,16 @@ rest_of_handle_dse (void)
 
   dse_step0 ();
   dse_step1 ();
+  /* DSE can eliminate potentially-trapping MEMs.
+     Remove any EH edges associated with them, since otherwise
+     DF_LR_RUN_DCE will complain later.  */
+  if ((locally_deleted || globally_deleted)
+      && cfun->can_throw_non_call_exceptions
+      && purge_all_dead_edges ())
+    {
+      free_dominance_info (CDI_DOMINATORS);
+      delete_unreachable_blocks ();
+    }
   dse_step2_init ();
   if (dse_step2 ())
     {


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-12 13:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-12 13:05 [gcc r13-373] rtl-optimization/105577 - RTL DSE and non-call EH Richard Biener

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).