Ada mainline bootstrap failing on x86 and x86_64
Daniel Berlin
dberlin@dberlin.org
Thu Oct 28 15:31:00 GMT 2004
On Wed, 27 Oct 2004, Andrew Pinski wrote:
>
> I get the same failure on powerpc-darwin plus now I also get the following
> related failures with the C compiler:
> FAIL: gcc.c-torture/execute/20010123-1.c compilation, -O1
> FAIL: gcc.c-torture/execute/20010123-1.c compilation, -O2
> FAIL: gcc.c-torture/execute/20010123-1.c compilation, -O3
> -fomit-frame-pointer
> FAIL: gcc.c-torture/execute/20010123-1.c compilation, -O3
> -fomit-frame-pointer -funroll-loops
> FAIL: gcc.c-torture/execute/20010123-1.c compilation, -O3
> -fomit-frame-pointer -funroll-all-loops -finline-functions
> FAIL: gcc.c-torture/execute/20010123-1.c compilation, -O3 -g
> FAIL: gcc.c-torture/execute/20010123-1.c compilation, -Os
>
>
> We are removing a modify expression which is not dead at all.
This isn't what is actually happening, although it turns out my patch did
cause it.
What's happening is that after we remove a dead modify expression, we
aren't renaming the phi arguments.
This occurs because i'm a moron and forgot a few lines of code.
It turns out that i must have discovered this before, because it works in
the version on my g5, which has a few more lines in the renamer.
A clean tree on my g5 fails, as expected.
This is the patch i have on my g5, which seems to work.
Please let me know if it fixes it for you guys as well.
Index: tree-into-ssa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-into-ssa.c,v
retrieving revision 2.26
diff -u -3 -p -u -p -r2.26 tree-into-ssa.c
--- tree-into-ssa.c 27 Oct 2004 17:45:19 -0000 2.26
+++ tree-into-ssa.c 28 Oct 2004 01:26:31 -0000
@@ -1390,7 +1390,8 @@ static void
rewrite_blocks (bool add_phi_args)
{
struct dom_walk_data walk_data;
-
+ sbitmap snames_to_rename = NULL;
+
/* Rewrite all the basic blocks in the program. */
timevar_push (TV_TREE_SSA_REWRITE_BLOCKS);
@@ -1403,10 +1404,16 @@ rewrite_blocks (bool add_phi_args)
walk_data.before_dom_children_after_stmts = NULL;
if (add_phi_args)
walk_data.before_dom_children_after_stmts = rewrite_add_phi_arguments;
+ else
+ {
+ snames_to_rename = sbitmap_alloc (num_ssa_names);
+ sbitmap_ones (snames_to_rename);
+ walk_data.before_dom_children_after_stmts = ssa_rewrite_phi_arguments;
+ }
walk_data.after_dom_children_before_stmts = NULL;
walk_data.after_dom_children_walk_stmts = NULL;
walk_data.after_dom_children_after_stmts = rewrite_finalize_block;
- walk_data.global_data = NULL;
+ walk_data.global_data = snames_to_rename;
walk_data.block_local_data_size = 0;
VARRAY_TREE_INIT (block_defs_stack, 10, "Block DEFS Stack");
@@ -1422,7 +1429,8 @@ rewrite_blocks (bool add_phi_args)
fini_walk_dominator_tree (&walk_data);
htab_delete (def_blocks);
-
+ if (snames_to_rename)
+ sbitmap_free (snames_to_rename);
timevar_pop (TV_TREE_SSA_REWRITE_BLOCKS);
}
More information about the Gcc
mailing list