This is the mail archive of the gcc@gcc.gnu.org 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]

What to do with new-ra for GCC 4.0


Hi,

Perhaps not so surprisingly, new-ra is completely broken on mainline
at the moment.  Literally not a single non-empty file will compile
with -fnew-ra.

First of all there is a bug in ra-build.c:live_in() which has been
there since the merge from the edge-vector-branch.  Then we hit an
ICE on sibcalls in ra.c:reg_alloc(), which also must have been there
since ages.  The patch below sort-of fixes these two issues.  But
then we hit SUBREG problems, probably due to rth's stricter subreg
patches.  At that point I gave up.

So, any nontrivial code will ICE with -fnew-ra.  I hate to bring up
painful issues, but I would like to propose we remove all of new-ra
for GCC 4.0 as it is complete and utterly broken anyway, and given
that it has been broken for months without anyone complaining, it's
not like anyone will miss it.

Thoughts?

Gr.
Steven





Index: ra.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ra.c,v
retrieving revision 1.21
diff -u -p -r1.21 ra.c
--- ra.c        28 Sep 2004 07:59:48 -0000      1.21
+++ ra.c        2 Jan 2005 12:57:22 -0000
@@ -686,6 +686,11 @@ reg_alloc (void)

       FOR_EACH_EDGE (e, ei, EXIT_BLOCK_PTR->preds)
        {
+         /* Do nothing for sibcalls, there already is a SET for the
+            return register.  */
+         if (e->flags & EDGE_SIBCALL)
+           continue;
+
          basic_block bb = e->src;
          last = BB_END (bb);
          if (!INSN_P (last) || GET_CODE (PATTERN (last)) != USE)
Index: ra-build.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ra-build.c,v
retrieving revision 1.39
diff -u -p -r1.39 ra-build.c
--- ra-build.c  25 Nov 2004 10:28:01 -0000      1.39
+++ ra-build.c  2 Jan 2005 12:56:14 -0000
@@ -960,6 +960,7 @@ live_in (struct df *df, struct curr_use
                live_in (df, use, insn);
              use->undefined = undef;
            }
+         e = EDGE_PRED (bb, i);
          insn = live_in_edge (df, use, e);
          if (!insn)
            return;


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