This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[tree-ssa]: Fix noreturn-1 regression
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 5 Jan 2004 14:35:49 -0500
- Subject: [tree-ssa]: Fix noreturn-1 regression
Bootstrapped and regtested on i686-pc-linux-gnu
2004-01-05 Daniel Berlin <dberlin@dberlin.org>
* tree-ssa-pre.c (added_phis): Removed.
Remove gt-tree-ssa-pre.h.
(process_left_occs_and_kills): ASM_EXPR's block load pre.
* Makefile.in (GTFILES): Don't process tree-ssa-pre.c.
gt-tree-ssa-pre.h isn't a gtfile anymore.
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.903.2.161
diff -u -3 -p -r1.903.2.161 Makefile.in
--- Makefile.in 4 Jan 2004 15:48:30 -0000 1.903.2.161
+++ Makefile.in 5 Jan 2004 19:25:09 -0000
@@ -2201,7 +2201,7 @@ GTFILES = $(srcdir)/input.h $(srcdir)/co
$(srcdir)/tree-ssanames.c $(srcdir)/tree-eh.c \
$(srcdir)/tree-phinodes.c $(srcdir)/tree-cfg.c \
$(srcdir)/tree-ssa.c $(srcdir)/tree-dfa.c $(srcdir)/tree-ssa-ccp.c \
- $(srcdir)/tree-ssa-pre.c $(srcdir)/tree-iterator.c \
+ $(srcdir)/tree-iterator.c \
$(srcdir)/tree-alias-type.h $(srcdir)/tree-alias-common.h \
$(srcdir)/tree-alias-type.c $(srcdir)/tree-alias-common.c \
$(srcdir)/tree-ssa-operands.h $(srcdir)/tree-ssa-operands.c \
@@ -2224,7 +2224,7 @@ gt-dbxout.h gt-c-common.h gt-c-decl.h gt
gt-c-pragma.h gtype-c.h gt-input.h gt-cfglayout.h \
gt-tree-alias-common.h gt-tree-mudflap.h \
gt-tree-ssa.h gt-tree-dfa.h gt-tree-ssa-ccp.h gt-tree-eh.h \
-gt-tree-ssa-pre.h gt-tree-ssanames.h gt-tree-iterator.h \
+gt-tree-ssanames.h gt-tree-iterator.h \
gt-tree-phinodes.h gt-tree-cfg.h \
gt-stringpool.h gt-langhooks.h : s-gtype ; @true
Index: tree-ssa-pre.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa-pre.c,v
retrieving revision 1.1.4.118
diff -u -3 -p -r1.1.4.118 tree-ssa-pre.c
--- tree-ssa-pre.c 19 Dec 2003 01:01:49 -0000 1.1.4.118
+++ tree-ssa-pre.c 5 Jan 2004 19:25:11 -0000
@@ -102,10 +102,8 @@ Boston, MA 02111-1307, USA. */
/* TODOS:
- Reimplement load PRE.
Do strength reduction on a +-b and -a, not just a * <constant>.
- Get rid of the ephis array in expr_info, since it's not necessary
- anymore. */
+ */
/* Debugging dumps. */
static FILE *dump_file;
@@ -282,11 +280,6 @@ struct ephi_use_entry
int opnd_indx;
};
-/* In order to prevent GC from deleting the phis we've added, we need
- to put them in a marked array, because the bb annotations are not
- marked. */
-static GTY(()) varray_type added_phis;
-
/* PRE Expression specific info. */
struct expr_info
{
@@ -2586,7 +2579,6 @@ code_motion (struct expr_info *ei)
bb = bb_for_stmt (use);
/* Add the new PHI node to the list of PHI nodes for block BB. */
bb_ann (bb)->phi_nodes = chainon (phi_nodes (bb), EREF_TEMP (use));
- VARRAY_PUSH_TREE (added_phis, EREF_TEMP (use));
}
else if (EPHI_IDENTITY (use))
{
@@ -2886,6 +2878,11 @@ process_left_occs_and_kills (varray_type
{
if (names_match_p (DEF_OP (defs, i), ei->expr))
{
+ if (TREE_CODE (expr) == ASM_EXPR)
+ {
+ ei->loadpre_cand = false;
+ continue;
+ }
VARRAY_PUSH_TREE (ei->lefts, expr);
VARRAY_PUSH_TREE (ei->occurs, NULL);
VARRAY_PUSH_TREE (ei->kills, NULL);
@@ -2962,6 +2959,7 @@ pre_expression (struct expr_info *slot,
compute_down_safety (ei);
compute_du_info (ei);
compute_will_be_avail (ei);
+
if (dump_file && (dump_flags & TDF_DETAILS))
{
fprintf (dump_file, "EPHI's for expression ");
@@ -2977,7 +2975,7 @@ pre_expression (struct expr_info *slot,
}
}
}
-
+
if (finalize_1 (ei))
{
finalize_2 (ei);
@@ -3167,8 +3165,6 @@ tree_perform_ssapre (tree fndecl, enum t
ephi_use_pool = create_alloc_pool ("EPHI use node pool",
sizeof (struct ephi_use_entry), 30);
VARRAY_GENERIC_PTR_INIT (bexprs, 1, "bexprs");
- VARRAY_TREE_INIT (added_phis, 1, "Added phis");
-
/* Compute immediate dominators. */
calculate_dominance_info (CDI_DOMINATORS);
@@ -3235,7 +3231,6 @@ tree_perform_ssapre (tree fndecl, enum t
for (i = 0; i < currbbs; i++)
if (idfs_cache[i] != NULL)
BITMAP_XFREE (idfs_cache[i]);
- added_phis = NULL;
/* Rewrite any new temporaries load PRE inserted. */
if (bitmap_first_set_bit (vars_to_rename) != -1)
@@ -3245,4 +3240,3 @@ tree_perform_ssapre (tree fndecl, enum t
timevar_pop (TV_TREE_PRE);
}
-#include "gt-tree-ssa-pre.h"