This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Fix Ada bootstrap (was: 16: EH redirection)

> I do not know how to fix this properly.  I can either make DCE to not
> remove unreachable blocks and remove them somewhere later, or simply
> drop DCE flag on DSE df_analyze or declare that it is up to caller to
> cleanup CFG after calling df_analyze with DCE flag when df_analyze
> somehow signalizes that it removed some throwing instructions or make
> DCE to update the bitmap?

Why not simply punt?  The same problem happens within CSE for c41401a.adb:

Index: dce.c
--- dce.c       (revision 146985)
+++ dce.c       (working copy)
@@ -27,6 +27,7 @@ along with GCC; see the file COPYING3.
 #include "regs.h"
 #include "hard-reg-set.h"
 #include "flags.h"
+#include "except.h"
 #include "df.h"
 #include "cselib.h"
 #include "dce.h"
@@ -35,9 +36,6 @@ along with GCC; see the file COPYING3.
 #include "dbgcnt.h"
 #include "tm_p.h"


 /* -------------------------------------------------------------------------
    Core mark/delete routines
@@ -118,6 +116,13 @@ deletable_insn_p (rtx insn, bool fast, b
   if (!NONJUMP_INSN_P (insn))
     return false;

+  /* Similarly, we cannot delete other insns that can throw inside of
+     the recursive dce.  */
+  if (flag_non_call_exceptions
+      && df_in_progress
+      && can_throw_internal (insn))
+    return false;
   body = PATTERN (insn);
   switch (GET_CODE (body))

Eric Botcazou

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]