This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFA] Fix Ada bootstrap (was: 16: EH redirection)
> Indeed. This patch is ok if it passes a bootstrap & regtest cycle.
It did on x86_64-suse-linux (with the problematic Ada change put back). The
remaining ACATS failures are:
=== acats tests ===
FAIL: c37213d
FAIL: c37213h
FAIL: c37213k
FAIL: c37215h
Applied on the mainline.
2009-04-30 Eric Botcazou <ebotcazou@adacore.com>
* Makefile.in (dce.o): Add $(EXCEPT_H).
* dce.c: Include except.h and delete redundant vector definitions.
(deletable_insn_p): Return false for non-call insns that can throw
if DF is running.
--
Eric Botcazou
Index: Makefile.in
===================================================================
--- Makefile.in (revision 146988)
+++ Makefile.in (working copy)
@@ -2680,7 +2680,7 @@ cse.o : cse.c $(CONFIG_H) $(SYSTEM_H) co
$(EXCEPT_H) $(TARGET_H) $(PARAMS_H) rtlhooks-def.h $(TREE_PASS_H) \
$(REAL_H) $(DF_H) $(DBGCNT_H)
dce.o : dce.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
- $(TREE_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) $(DF_H) cselib.h \
+ $(TREE_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) $(EXCEPT_H) $(DF_H) cselib.h \
$(DBGCNT_H) dce.h $(TIMEVAR_H) $(TREE_PASS_H) $(DBGCNT_H) $(TM_P_H)
dse.o : dse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(TM_P_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
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"
-DEF_VEC_I(int);
-DEF_VEC_ALLOC_I(int,heap);
-
/* -------------------------------------------------------------------------
Core mark/delete routines
@@ -118,6 +116,10 @@ deletable_insn_p (rtx insn, bool fast, b
if (!NONJUMP_INSN_P (insn))
return false;
+ /* Similarly, we cannot delete other insns that can throw either. */
+ if (df_in_progress && flag_non_call_exceptions && can_throw_internal (insn))
+ return false;
+
body = PATTERN (insn);
switch (GET_CODE (body))
{